refactor: Update navigation in order pages to use pop method for back action
This commit is contained in:
@@ -70,7 +70,7 @@ class OneTimeOrderPage extends StatelessWidget {
|
||||
bloc.add(OneTimeOrderPositionRemoved(index)),
|
||||
onSubmit: () => bloc.add(const OneTimeOrderSubmitted()),
|
||||
onDone: () => Modular.to.toOrdersSpecificDate(state.date),
|
||||
onBack: () => Modular.to.toCreateOrder(),
|
||||
onBack: () => Modular.to.pop(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -77,7 +77,7 @@ class PermanentOrderPage extends StatelessWidget {
|
||||
// Navigate to orders page with the initial date set to the first recurring shift date
|
||||
Modular.to.toOrdersSpecificDate(initialDate);
|
||||
},
|
||||
onBack: () => Modular.to.toCreateOrder(),
|
||||
onBack: () => Modular.to.pop(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -88,7 +88,7 @@ class RecurringOrderPage extends StatelessWidget {
|
||||
// Navigate to orders page with the initial date set to the first recurring shift date
|
||||
Modular.to.toOrdersSpecificDate(initialDate);
|
||||
},
|
||||
onBack: () => Modular.to.toCreateOrder(),
|
||||
onBack: () => Modular.to.pop(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user