GetMaterialApp constructor
const
GetMaterialApp({
- Key? key,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - Widget? home,
- Map<
String, Widget Function(BuildContext)> routes = const <String, WidgetBuilder>{}, - String? initialRoute,
- RouteFactory? onGenerateRoute,
- InitialRouteListFactory? onGenerateInitialRoutes,
- RouteFactory? onUnknownRoute,
- bool useInheritedMediaQuery = false,
- TransitionBuilder? builder,
- TextDirection? textDirection,
- String title = '',
- GenerateAppTitle? onGenerateTitle,
- Color? color,
- ThemeData? theme,
- ThemeData? darkTheme,
- ThemeMode themeMode = ThemeMode.system,
- Locale? locale,
- Locale? fallbackLocale,
- Iterable<
LocalizationsDelegate> ? localizationsDelegates, - LocaleListResolutionCallback? localeListResolutionCallback,
- LocaleResolutionCallback? localeResolutionCallback,
- Iterable<
Locale> supportedLocales = const <Locale>[Locale('en', 'US')], - bool debugShowMaterialGrid = false,
- bool showPerformanceOverlay = false,
- bool checkerboardRasterCacheImages = false,
- bool checkerboardOffscreenLayers = false,
- bool showSemanticsDebugger = false,
- bool debugShowCheckedModeBanner = true,
- Map<
LogicalKeySet, Intent> ? shortcuts, - ScrollBehavior? scrollBehavior,
- CustomTransition? customTransition,
- Map<
String, Map< ? translationsKeys,String, String> > - Translations? translations,
- VoidCallback? onInit,
- VoidCallback? onReady,
- VoidCallback? onDispose,
- ValueChanged<
Routing?> ? routingCallback, - Transition? defaultTransition,
- List<
GetPage> ? getPages, - bool? opaqueRoute,
- bool? enableLog = kDebugMode,
- LogWriterCallback? logWriterCallback,
- bool? popGesture,
- Duration? transitionDuration,
- bool? defaultGlobalState,
- SmartManagement smartManagement = SmartManagement.full,
- Bindings? initialBinding,
- GetPage? unknownRoute,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- Map<
Type, Action< ? actions,Intent> >
Implementation
const GetMaterialApp({
Key? key,
this.navigatorKey,
this.scaffoldMessengerKey,
this.home,
Map<String, Widget Function(BuildContext)> this.routes =
const <String, WidgetBuilder>{},
this.initialRoute,
this.onGenerateRoute,
this.onGenerateInitialRoutes,
this.onUnknownRoute,
this.useInheritedMediaQuery = false,
List<NavigatorObserver> 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.scrollBehavior,
this.customTransition,
this.translationsKeys,
this.translations,
this.onInit,
this.onReady,
this.onDispose,
this.routingCallback,
this.defaultTransition,
this.getPages,
this.opaqueRoute,
this.enableLog = kDebugMode,
this.logWriterCallback,
this.popGesture,
this.transitionDuration,
this.defaultGlobalState,
this.smartManagement = SmartManagement.full,
this.initialBinding,
this.unknownRoute,
this.highContrastTheme,
this.highContrastDarkTheme,
this.actions,
}) : routeInformationProvider = null,
routeInformationParser = null,
routerDelegate = null,
backButtonDispatcher = null,
super(key: key);