forked from yaso_meth/mih-project
update sign out nav
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_circle_avatar.dart';
|
||||
@@ -32,23 +33,14 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
||||
}
|
||||
|
||||
Widget displayProPic() {
|
||||
// return MIHProfilePicture(
|
||||
// profilePictureFile: widget.propicFile,
|
||||
// proPicController: proPicController,
|
||||
// proPic: null,
|
||||
// width: 45,
|
||||
// radius: 21,
|
||||
// editable: false,
|
||||
// onChange: (newProPic) {},
|
||||
// ),
|
||||
//print(widget.propicFile);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).pushNamed(
|
||||
'/mzansi-profile',
|
||||
arguments:
|
||||
AppProfileUpdateArguments(widget.signedInUser, widget.propicFile),
|
||||
context.goNamed(
|
||||
'mzansiProfileManage',
|
||||
extra: AppProfileUpdateArguments(
|
||||
widget.signedInUser,
|
||||
widget.propicFile,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: MihCircleAvatar(
|
||||
@@ -280,11 +272,18 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
||||
});
|
||||
if (await SuperTokens.doesSessionExist() ==
|
||||
false) {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.of(context).popAndPushNamed(
|
||||
'/',
|
||||
arguments: AuthArguments(true, false),
|
||||
context.goNamed(
|
||||
'home',
|
||||
extra: AuthArguments(
|
||||
true,
|
||||
true,
|
||||
),
|
||||
);
|
||||
// Navigator.of(context).pop();
|
||||
// Navigator.of(context).popAndPushNamed(
|
||||
// '/',
|
||||
// arguments: AuthArguments(true, false),
|
||||
// );
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user