switch to context.pop() so we're going through the goRouter pkg as designed

This commit is contained in:
Shawn 2024-01-09 14:57:11 -07:00
parent 824f4a1ff1
commit 3d9d15c5a0

View File

@ -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);
}
}
}
}