back button on auth
This commit is contained in:
@@ -121,7 +121,8 @@ class _MihPackageState extends State<MihPackage>
|
|||||||
child: PopScope(
|
child: PopScope(
|
||||||
canPop: false,
|
canPop: false,
|
||||||
onPopInvokedWithResult: (bool didPop, Object? result) {
|
onPopInvokedWithResult: (bool didPop, Object? result) {
|
||||||
if (GoRouterState.of(context).name == 'mihHome') {
|
if (GoRouterState.of(context).name == 'mihHome' ||
|
||||||
|
GoRouterState.of(context).name == 'mihAuthentication') {
|
||||||
if (lastPressedAt == null ||
|
if (lastPressedAt == null ||
|
||||||
DateTime.now().difference(lastPressedAt!) >
|
DateTime.now().difference(lastPressedAt!) >
|
||||||
const Duration(seconds: 2)) {
|
const Duration(seconds: 2)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user