import 'package:flutter/material.dart';
|
|
import '/utils/storage/database.dart';
|
|
import '/models/my_profile.dart';
|
|
|
|
class Profile extends StatefulWidget {
|
|
const Profile({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<Profile> createState() => _ProfileState();
|
|
}
|
|
|
|
class _ProfileState extends State<Profile> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: SingleChildScrollView(
|
|
physics: const BouncingScrollPhysics(),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
SafeArea(
|
|
child: Padding(
|
|
padding: const EdgeInsets.only(left: 16,right: 16,top: 10),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: <Widget>[
|
|
const Text("Profile",style: TextStyle(fontSize: 32,fontWeight: FontWeight.bold),),
|
|
Container(
|
|
padding: const EdgeInsets.only(left: 8,right: 8,top: 2,bottom: 2),
|
|
height: 30,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(30),
|
|
color: Theme.of(context).colorScheme.tertiary
|
|
),
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
deleteDb();
|
|
MyProfile.logout();
|
|
Navigator.pushNamedAndRemoveUntil(context, '/landing', ModalRoute.withName('/landing'));
|
|
},
|
|
child: Row(
|
|
children: <Widget>[
|
|
Icon(
|
|
Icons.logout,
|
|
color: Theme.of(context).primaryColor,
|
|
size: 20
|
|
),
|
|
const SizedBox(width: 2,),
|
|
const Text(
|
|
'Logout',
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.bold
|
|
)
|
|
),
|
|
],
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 16,left: 16,right: 16),
|
|
child: Row(
|
|
children: const <Widget>[
|
|
Text('FUCK'),
|
|
],
|
|
)
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|