fix: route back button
This commit is contained in:
parent
33b2ab85e3
commit
f2f688f9f3
|
@ -66,18 +66,32 @@ class _SubmissionParentState extends State<SubmissionParent> {
|
|||
return ChangeNotifierProvider(
|
||||
create: (context) => SubmissionDataViewModel(),
|
||||
builder: (context, child) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvoked: (didPop) async {
|
||||
if (didPop) {
|
||||
return;
|
||||
}
|
||||
await routePush(context,
|
||||
page: const BottomNavigationView(),
|
||||
routeType: RouteType.pushReplace);
|
||||
return false;
|
||||
},
|
||||
child: Consumer<SubmissionDataViewModel>(
|
||||
builder: (context, provider, child) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
height: SizeConfig.height * .1, title: 'Registration'),
|
||||
height: SizeConfig.height * .1,
|
||||
title: 'Registration',
|
||||
leading: BackButton(
|
||||
onPressed: () {
|
||||
routePush(
|
||||
context,
|
||||
page: const BottomNavigationView(),
|
||||
routeType: RouteType.pushReplace,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
Column(
|
||||
|
|
Loading…
Reference in New Issue
Block a user