File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
lib/src/presenter/navigation Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1- ## [ 4.1.1 ] - 2021-10-04
1+ ## [ 4.1.2 ] - 2021-10-08
22* Added "maintainState" in routes. [ #572 ] ( https://github.com/Flutterando/modular/issues/572 )
3+ * Fixed pushReplacementNamed
34
45## [ 4.1.0+1] - 2021-10-01
56* Modular is now HOT-RELOAD friendly!
Original file line number Diff line number Diff line change @@ -180,13 +180,14 @@ class ModularRouterDelegate extends RouterDelegate<ModularBook>
180180 arguments: arguments, popCallback: popComplete.complete);
181181 final currentRoutes = [...currentConfiguration! .routes];
182182 if (forRoot) {
183- currentRoutes.removeWhere ((element) => element.schema != '' );
184- currentRoutes.removeLast ();
185- book = currentConfiguration! .copyWith (
186- routes: [...currentRoutes, book.routes.first.copyWith (schema: '' )]);
183+ //;currentRoutes.removeWhere((element) => element.schema != '');
184+ final indexLast =
185+ currentRoutes.lastIndexWhere ((element) => element.schema == '' );
186+ currentRoutes[indexLast] = book.routes.first.copyWith (schema: '' );
187+ book = currentConfiguration! .copyWith (routes: [...currentRoutes]);
187188 await setNewRoutePath (book);
188189 } else {
189- final list = [...currentConfiguration ! .routes] ..removeLast ();
190+ final list = currentRoutes ..removeLast ();
190191
191192 for (var route in book.routes.reversed) {
192193 if (list
Original file line number Diff line number Diff line change 11name : flutter_modular
22description : Smart project structure with dependency injection and route management
3- version : 4.1.1
3+ version : 4.1.2
44homepage : https://github.com/Flutterando/modular
55
66environment :
You can’t perform that action at this time.
0 commit comments