GetMaterialApp constructor

const GetMaterialApp(
  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. Map<String, Map<String, String>> translationsKeys,
  12. Translations translations,
  13. TextDirection textDirection,
  14. String title = '',
  15. GenerateAppTitle onGenerateTitle,
  16. Color color,
  17. CustomTransition customTransition,
  18. VoidCallback onInit,
  19. VoidCallback onDispose,
  20. ThemeData theme,
  21. ThemeData darkTheme,
  22. ThemeMode themeMode = ThemeMode.system,
  23. Locale locale,
  24. Locale fallbackLocale,
  25. Iterable<LocalizationsDelegate> localizationsDelegates,
  26. LocaleListResolutionCallback localeListResolutionCallback,
  27. LocaleResolutionCallback localeResolutionCallback,
  28. Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
  29. bool debugShowMaterialGrid = false,
  30. bool showPerformanceOverlay = false,
  31. bool checkerboardRasterCacheImages = false,
  32. bool checkerboardOffscreenLayers = false,
  33. bool showSemanticsDebugger = false,
  34. bool debugShowCheckedModeBanner = true,
  35. Map<LogicalKeySet, Intent> shortcuts,
  36. SmartManagement smartManagement = SmartManagement.full,
  37. Bindings initialBinding,
  38. GetPage unknownRoute,
  39. dynamic routingCallback(
    1. Routing
    ),
  40. Transition defaultTransition,
  41. List<GetPage> getPages,
  42. bool opaqueRoute,
  43. bool enableLog,
  44. LogWriterCallback logWriterCallback,
  45. bool popGesture,
  46. Duration transitionDuration,
  47. bool defaultGlobalState}
)

Implementation

const GetMaterialApp({
  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.translationsKeys,
  this.translations,
  this.textDirection,
  this.title = '',
  this.onGenerateTitle,
  this.color,
  this.customTransition,
  this.onInit,
  this.onDispose,
  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.smartManagement = SmartManagement.full,
  this.initialBinding,
  this.unknownRoute,
  this.routingCallback,
  this.defaultTransition,
  // this.actions,
  this.getPages,
  this.opaqueRoute,
  this.enableLog,
  this.logWriterCallback,
  this.popGesture,
  this.transitionDuration,
  this.defaultGlobalState,
})  : 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),
      super(key: key);