Commit 0004072 1 parent ec0a36b commit 0004072 Copy full SHA for 0004072
File tree 3 files changed +9
-13
lines changed
code_generation/router_annotation
3 files changed +9
-13
lines changed Original file line number Diff line number Diff line change 1
1
import 'dart:async' ;
2
+ import 'dart:ui' ;
2
3
3
4
import 'package:flutter/foundation.dart' show kIsWeb;
4
5
import 'package:flutter/material.dart' ;
@@ -235,12 +236,10 @@ class ExtendedNavigatorState<T extends RouterBase?>
235
236
assert (router != null );
236
237
return Navigator (
237
238
key: _navigatorKey,
238
- initialRoute:
239
- ambiguate (WidgetsBinding .instance)! .window.defaultRouteName !=
240
- Navigator .defaultRouteName
241
- ? ambiguate (WidgetsBinding .instance)! .window.defaultRouteName
242
- : initial ??
243
- ambiguate (WidgetsBinding .instance)! .window.defaultRouteName,
239
+ initialRoute: PlatformDispatcher .instance.defaultRouteName !=
240
+ Navigator .defaultRouteName
241
+ ? PlatformDispatcher .instance.defaultRouteName
242
+ : initial ?? PlatformDispatcher .instance.defaultRouteName,
244
243
observers: List .from (widget.observers)..add (_heroController! ),
245
244
onGenerateRoute: (RouteSettings settings) {
246
245
return router! .onGenerateRoute (settings, basePath);
Original file line number Diff line number Diff line change
1
+ import 'package:flutter/foundation.dart' ;
1
2
import 'package:flutter/services.dart' ;
2
3
import 'package:flutter/widgets.dart' ;
3
4
import 'package:stacked/src/router/parser/route_information_parser.dart' ;
@@ -19,7 +20,7 @@ class StackedRouteInformationProvider extends RouteInformationProvider
19
20
bool Function (String ? location)? neglectWhen}) {
20
21
final initialRouteInfo = initialRouteInformation ??
21
22
RouteInformation (
22
- location: WidgetsBinding .instance.window .defaultRouteName);
23
+ location: PlatformDispatcher .instance.defaultRouteName);
23
24
return StackedRouteInformationProvider ._(
24
25
initialRouteInformation: initialRouteInfo,
25
26
neglectIf: neglectWhen,
@@ -56,8 +57,8 @@ class StackedRouteInformationProvider extends RouteInformationProvider
56
57
RouteInformation get value => _value;
57
58
RouteInformation _value;
58
59
59
- RouteInformation _valueInEngine = RouteInformation (
60
- location: WidgetsBinding .instance.window .defaultRouteName);
60
+ RouteInformation _valueInEngine =
61
+ RouteInformation ( location: PlatformDispatcher .instance.defaultRouteName);
61
62
62
63
void _platformReportsNewRouteInformation (RouteInformation routeInformation) {
63
64
if (_value == routeInformation) return ;
Original file line number Diff line number Diff line change @@ -99,10 +99,6 @@ class SkeletonLoaderState extends State<SkeletonLoader>
99
99
// We only want to show this if the widget is loading OR if the widget is busy with the transition.
100
100
child: widget.loading || _transitionToNewWidget
101
101
? AnimatedSize (
102
- /// TODO: This field is depreacted but I'm adding it
103
- /// to support older versions for flutter
104
- // ignore: deprecated_member_use
105
- vsync: this ,
106
102
duration: const Duration (milliseconds: 450 ),
107
103
curve: Curves .easeOut,
108
104
child: ShaderMask (
You can’t perform that action at this time.
0 commit comments