mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 16:08:55 +03:30
Back button of other pages navigate to home
This commit is contained in:
@@ -96,13 +96,16 @@ class _FormPageState extends State<FormPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
Routes.testResultAddScreen,
|
||||
);
|
||||
return true;
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvoked: (didPop) {
|
||||
if (didPop) return;
|
||||
Navigator.of(context).pushNamed(Routes.homePage);
|
||||
// Navigator.pushReplacementNamed(
|
||||
// context,
|
||||
// Routes.testResultAddScreen,
|
||||
// );
|
||||
// return true;
|
||||
},
|
||||
child: SafeArea(
|
||||
child: Scaffold(
|
||||
|
||||
Reference in New Issue
Block a user