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