refactor: enhance navigation robustness by introducing popSafe and safePushNamedAndRemoveUntil methods and updating their usage.
This commit is contained in:
@@ -46,19 +46,19 @@ class ClientMainCubit extends Cubit<ClientMainState> implements Disposable {
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
Modular.to.navigate(ClientPaths.coverage);
|
||||
Modular.to.toClientCoverage();
|
||||
break;
|
||||
case 1:
|
||||
Modular.to.navigate(ClientPaths.billing);
|
||||
Modular.to.toClientBilling();
|
||||
break;
|
||||
case 2:
|
||||
Modular.to.navigate(ClientPaths.home);
|
||||
Modular.to.toClientHome();
|
||||
break;
|
||||
case 3:
|
||||
Modular.to.navigate(ClientPaths.orders);
|
||||
Modular.to.toClientOrders();
|
||||
break;
|
||||
case 4:
|
||||
Modular.to.navigate(ClientPaths.reports);
|
||||
Modular.to.toClientReports();
|
||||
break;
|
||||
}
|
||||
// State update will happen via _onRouteChanged
|
||||
|
||||
Reference in New Issue
Block a user