createRoute method

  1. @override
Route createRoute(
  1. RouteSettings settings,
  2. RouteOptions options
)
override

Implementation

@override
Route<dynamic> createRoute(RouteSettings settings, RouteOptions options) {
  BuildContext context = MeteorFlutterNavigator.rootKey!.currentContext!;
  final CapturedThemes themes = InheritedTheme.capture(
    from: context,
    to: Navigator.of(context, rootNavigator: useRootNavigator ?? true).context,
  );
  return DialogRoute(
    context: context,
    settings: settings,
    barrierColor: barrierColor,
    barrierLabel: barrierLabel,
    useSafeArea: useSafeArea ?? true,
    anchorPoint: anchorPoint,
    traversalEdgeBehavior: traversalEdgeBehavior,
    themes: themes,
    builder: (context) => options.builder(settings.arguments as Map<String, dynamic>?),
  );
}