diff --git a/lib/views/group_screen.dart b/lib/views/group_screen.dart index fa0d36e..6698a67 100644 --- a/lib/views/group_screen.dart +++ b/lib/views/group_screen.dart @@ -65,15 +65,6 @@ class _GroupScreenState extends State MediaQuery.of(context).size.height - 200), painter: ShapePainter(), ), - // Creating a back button - // Align( - // alignment: Alignment(-0.9, -0.8), - // child: FloatingActionButton( - // onPressed: () => navigationService.pop(), - // backgroundColor: kYellow, - // child: Icon(Icons.arrow_back_rounded), - // ), - // ), Align( alignment: Alignment(-0.7, -0.95), child: Container( @@ -91,53 +82,11 @@ class _GroupScreenState extends State Align( alignment: Alignment(0.9, -0.8), child: FloatingActionButton( - onPressed: () => showDialog( - context: context, - builder: (context) => AlertDialog( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - // actionsAlignment: - // MainAxisAlignment.spaceEvenly, - title: Text( - userConfig!.currentUser!.isGuest! - ? 'Create Account' - : 'Logout', - style: TextStyle( - fontSize: 25, color: kYellow), - ), - content: Text( - userConfig!.currentUser!.isGuest! - ? 'Would you like to create an account?' - : 'Are you sure you wanna logout?', - style: TextStyle( - fontSize: 16, color: kBlack), - ), - actions: [ - HikeButton( - buttonHeight: 2.5.h, - buttonWidth: 8.w, - onTap: () => - Navigator.of(context).pop(false), - text: 'No', - textSize: 18.0, - ), - HikeButton( - buttonHeight: 2.5.h, - buttonWidth: 8.w, - onTap: () { - navigationService!.pop(); - model.logout(); - }, - text: 'Yes', - textSize: 18.0, - ), - ], - )), + onPressed: () => Navigator.of(context).pop(), backgroundColor: kYellow, - child: userConfig!.currentUser!.isGuest! + child: (userConfig.currentUser.isGuest) ? Icon(Icons.person) - : Icon(Icons.logout), + : Icon(Icons.arrow_back), ), ), Padding(