GetNavigator constructor
GetNavigator({
- GlobalKey<
NavigatorState> ? key, - bool onPopPage(
- Route,
- dynamic
- required List<
Page> pages, - List<
NavigatorObserver> ? observers, - bool reportsRouteUpdateToEngine = false,
- TransitionDelegate? transitionDelegate,
Implementation
GetNavigator({
GlobalKey<NavigatorState>? key,
bool Function(Route<dynamic>, dynamic)? onPopPage,
required List<Page> pages,
List<NavigatorObserver>? observers,
bool reportsRouteUpdateToEngine = false,
TransitionDelegate? transitionDelegate,
}) : super(
//keys should be optional
key: key,
onPopPage: onPopPage ??
(route, result) {
final didPop = route.didPop(result);
if (!didPop) {
return false;
}
return true;
},
reportsRouteUpdateToEngine: reportsRouteUpdateToEngine,
pages: pages,
observers: [
// GetObserver(),
if (observers != null) ...observers,
],
transitionDelegate:
transitionDelegate ?? const DefaultTransitionDelegate<dynamic>(),
);