refactor: Update navigation in order pages to use pop method for back action
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import 'package:firebase_data_connect/firebase_data_connect.dart';
|
import 'package:firebase_data_connect/firebase_data_connect.dart';
|
||||||
import 'package:krow_data_connect/krow_data_connect.dart' as dc;
|
import 'package:krow_data_connect/krow_data_connect.dart' as dc;
|
||||||
import 'package:krow_domain/krow_domain.dart';
|
import 'package:krow_domain/krow_domain.dart';
|
||||||
import '../../domain/repositories/home_repository_interface.dart';
|
import '../../domain/repositories/home_repository_interface.dart';
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class OneTimeOrderPage extends StatelessWidget {
|
|||||||
bloc.add(OneTimeOrderPositionRemoved(index)),
|
bloc.add(OneTimeOrderPositionRemoved(index)),
|
||||||
onSubmit: () => bloc.add(const OneTimeOrderSubmitted()),
|
onSubmit: () => bloc.add(const OneTimeOrderSubmitted()),
|
||||||
onDone: () => Modular.to.toOrdersSpecificDate(state.date),
|
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
|
// Navigate to orders page with the initial date set to the first recurring shift date
|
||||||
Modular.to.toOrdersSpecificDate(initialDate);
|
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
|
// Navigate to orders page with the initial date set to the first recurring shift date
|
||||||
Modular.to.toOrdersSpecificDate(initialDate);
|
Modular.to.toOrdersSpecificDate(initialDate);
|
||||||
},
|
},
|
||||||
onBack: () => Modular.to.toCreateOrder(),
|
onBack: () => Modular.to.pop(),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user