switch to context.pop() so we're going through the goRouter pkg as designed
This commit is contained in:
parent
824f4a1ff1
commit
3d9d15c5a0
@ -138,7 +138,11 @@ class BackBtn extends StatelessWidget {
|
||||
if (onPressed != null) {
|
||||
onPressed?.call();
|
||||
} else {
|
||||
Navigator.of(context).pop();
|
||||
if (context.canPop()) {
|
||||
context.pop();
|
||||
} else {
|
||||
context.go(ScreenPaths.home);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user