Application constructor

Application({
  1. Key? key,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. Widget? home,
  4. Map<String, WidgetBuilder>? routes = const <String, WidgetBuilder>{},
  5. String? initialRoute,
  6. RouteFactory? onGenerateRoute,
  7. InitialRouteListFactory? onGenerateInitialRoutes,
  8. RouteFactory? onUnknownRoute,
  9. List<NavigatorObserver>? navigatorObservers = const <NavigatorObserver>[],
  10. TransitionBuilder? builder,
  11. TextDirection? textDirection,
  12. String title = '',
  13. GenerateAppTitle? onGenerateTitle,
  14. Color? color,
  15. ThemeData? theme,
  16. ThemeData? darkTheme,
  17. ThemeMode themeMode = ThemeMode.system,
  18. Locale? locale,
  19. Locale? fallbackLocale,
  20. Iterable<LocalizationsDelegate>? localizationsDelegates,
  21. LocaleListResolutionCallback? localeListResolutionCallback,
  22. LocaleResolutionCallback? localeResolutionCallback,
  23. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  24. bool debugShowMaterialGrid = false,
  25. bool showPerformanceOverlay = false,
  26. bool checkerboardRasterCacheImages = false,
  27. bool checkerboardOffscreenLayers = false,
  28. bool showSemanticsDebugger = false,
  29. bool debugShowCheckedModeBanner = true,
  30. Map<LogicalKeySet, Intent>? shortcuts,
  31. CustomTransition? customTransition,
  32. Map<String, Map<String, String>>? translationsKeys,
  33. Translations? translations,
  34. VoidCallback? onInit,
  35. VoidCallback? onReady,
  36. VoidCallback? onDispose,
  37. ValueChanged<Routing?>? routingCallback,
  38. Transition? defaultTransition,
  39. List<GetPage>? getPages,
  40. bool? opaqueRoute,
  41. bool? enableLog,
  42. LogWriterCallback? logWriterCallback,
  43. bool? popGesture,
  44. Duration? transitionDuration,
  45. bool? defaultGlobalState,
  46. SmartManagement smartManagement = SmartManagement.full,
  47. Bindings? initialBinding,
  48. GetPage? unknownRoute,
  49. ThemeData? highContrastTheme,
  50. ThemeData? highContrastDarkTheme,
  51. Map<Type, Action<Intent>>? actions,
})

Implementation

Application({
  Key? key,
  this.navigatorKey,
  this.home,
  this.routes = const <String, WidgetBuilder>{},
  this.initialRoute,
  this.onGenerateRoute,
  this.onGenerateInitialRoutes,
  this.onUnknownRoute,
  this.navigatorObservers = const <NavigatorObserver>[],
  this.builder,
  this.textDirection,
  this.title = '',
  this.onGenerateTitle,
  this.color,
  this.theme,
  this.darkTheme,
  this.themeMode = ThemeMode.system,
  this.locale,
  this.fallbackLocale,
  this.localizationsDelegates,
  this.localeListResolutionCallback,
  this.localeResolutionCallback,
  this.supportedLocales = const <Locale>[Locale('en', 'US')],
  this.debugShowMaterialGrid = false,
  this.showPerformanceOverlay = false,
  this.checkerboardRasterCacheImages = false,
  this.checkerboardOffscreenLayers = false,
  this.showSemanticsDebugger = false,
  this.debugShowCheckedModeBanner = true,
  this.shortcuts,
  this.customTransition,
  this.translationsKeys,
  this.translations,
  this.onInit,
  this.onReady,
  this.onDispose,
  this.routingCallback,
  this.defaultTransition,
  this.getPages,
  this.opaqueRoute,
  this.enableLog,
  this.logWriterCallback,
  this.popGesture,
  this.transitionDuration,
  this.defaultGlobalState,
  this.smartManagement = SmartManagement.full,
  this.initialBinding,
  this.unknownRoute,
  this.highContrastTheme,
  this.highContrastDarkTheme,
  this.actions,
})  : assert(routes != null),
      assert(navigatorObservers != null),
      assert(title != null),
      assert(debugShowMaterialGrid != null),
      assert(showPerformanceOverlay != null),
      assert(checkerboardRasterCacheImages != null),
      assert(checkerboardOffscreenLayers != null),
      assert(showSemanticsDebugger != null),
      assert(debugShowCheckedModeBanner != null),
      routeInformationProvider = null,
      routeInformationParser = null,
      routerDelegate = null,
      backButtonDispatcher = null,
      super(key: key);