File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 14.8.0
2+
3+ - Adds ` preload ` parameter to ` StatefulShellBranchData.$branch ` .
4+
15## 14.7.2
26
37- Add missing ` await ` keyword to ` onTap ` callback in ` navigation.md ` .
Original file line number Diff line number Diff line change @@ -342,13 +342,15 @@ abstract class StatefulShellBranchData {
342342 List <NavigatorObserver >? observers,
343343 String ? initialLocation,
344344 String ? restorationScopeId,
345+ bool preload = false ,
345346 }) {
346347 return StatefulShellBranch (
347348 routes: routes,
348349 navigatorKey: navigatorKey,
349350 observers: observers,
350351 initialLocation: initialLocation,
351352 restorationScopeId: restorationScopeId,
353+ preload: preload,
352354 );
353355 }
354356}
Original file line number Diff line number Diff line change 11name : go_router
22description : A declarative router for Flutter based on Navigation 2 supporting
33 deep linking, data-driven routes and more
4- version : 14.7.2
4+ version : 14.8.0
55repository : https://github.com/flutter/packages/tree/main/packages/go_router
66issue_tracker : https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22
77
Original file line number Diff line number Diff line change @@ -420,6 +420,21 @@ void main() {
420420 });
421421 });
422422
423+ group ('StatefulShellBranchData' , () {
424+ test ('Can assign preload' , () {
425+ final StatefulShellBranch branch = StatefulShellBranchData .$branch (
426+ preload: true ,
427+ routes: < RouteBase > [
428+ GoRouteData .$route (
429+ path: '/child' ,
430+ factory : (GoRouterState state) => const _GoRouteDataBuild (),
431+ ),
432+ ],
433+ );
434+ expect (branch.preload, true );
435+ });
436+ });
437+
423438 testWidgets (
424439 'It should redirect using the overridden redirect method' ,
425440 (WidgetTester tester) async {
You can’t perform that action at this time.
0 commit comments