Encrypted messaging app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.5 KiB

  1. import 'package:flutter/material.dart';
  2. import '/utils/storage/database.dart';
  3. import '/models/my_profile.dart';
  4. class Profile extends StatefulWidget {
  5. const Profile({Key? key}) : super(key: key);
  6. @override
  7. State<Profile> createState() => _ProfileState();
  8. }
  9. class _ProfileState extends State<Profile> {
  10. @override
  11. Widget build(BuildContext context) {
  12. return Scaffold(
  13. body: SingleChildScrollView(
  14. physics: const BouncingScrollPhysics(),
  15. child: Column(
  16. crossAxisAlignment: CrossAxisAlignment.start,
  17. children: <Widget>[
  18. SafeArea(
  19. child: Padding(
  20. padding: const EdgeInsets.only(left: 16,right: 16,top: 10),
  21. child: Row(
  22. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  23. children: <Widget>[
  24. const Text("Profile",style: TextStyle(fontSize: 32,fontWeight: FontWeight.bold),),
  25. Container(
  26. padding: const EdgeInsets.only(left: 8,right: 8,top: 2,bottom: 2),
  27. height: 30,
  28. decoration: BoxDecoration(
  29. borderRadius: BorderRadius.circular(30),
  30. color: Theme.of(context).colorScheme.tertiary
  31. ),
  32. child: GestureDetector(
  33. onTap: () {
  34. deleteDb();
  35. MyProfile.logout();
  36. Navigator.pushNamedAndRemoveUntil(context, '/landing', ModalRoute.withName('/landing'));
  37. },
  38. child: Row(
  39. children: <Widget>[
  40. Icon(
  41. Icons.logout,
  42. color: Theme.of(context).primaryColor,
  43. size: 20
  44. ),
  45. const SizedBox(width: 2,),
  46. const Text(
  47. 'Logout',
  48. style: TextStyle(
  49. fontSize: 14,
  50. fontWeight: FontWeight.bold
  51. )
  52. ),
  53. ],
  54. ),
  55. ),
  56. )
  57. ],
  58. ),
  59. ),
  60. ),
  61. Padding(
  62. padding: const EdgeInsets.only(top: 16,left: 16,right: 16),
  63. child: Row(
  64. children: const <Widget>[
  65. Text('FUCK'),
  66. ],
  67. )
  68. ),
  69. ],
  70. ),
  71. ),
  72. );
  73. }
  74. }