toMaterialApp method
MaterialApp
toMaterialApp({
- Key? key,
- GlobalKey<
ScaffoldMessengerState> ? scaffoldMessengerKey, - Widget? home,
- String initialRoute = "/",
- Widget builder(
- BuildContext context,
- Widget? widget
- String title = '',
- String onGenerateTitle(
- BuildContext context
- Color? color,
- ThemeData? theme,
- ThemeData? darkTheme,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- ThemeMode? themeMode = ThemeMode.system,
- Duration themeAnimationDuration = kThemeAnimationDuration,
- Curve themeAnimationCurve = Curves.linear,
- Locale? locale,
- Iterable<
LocalizationsDelegate> ? localizationsDelegates, - Locale? localeListResolutionCallback()?,
- Locale? 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<
ShortcutActivator, Intent> ? shortcuts, - Map<
Type, Action< ? actions,Intent> > - String? restorationScopeId,
- ScrollBehavior? scrollBehavior,
- bool useInheritedMediaQuery = false,
- AnimationStyle? themeAnimationStyle,
GeneralLibraryFlutter
Implementation
MaterialApp toMaterialApp({
/// GeneralLibraryFlutter
Key? key,
/// GeneralLibraryFlutter
GlobalKey<NavigatorState>? navigatorKey,
/// GeneralLibraryFlutter
GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey,
/// GeneralLibraryFlutter
Widget? home,
/// GeneralLibraryFlutter
String initialRoute = "/",
/// GeneralLibraryFlutter
bool Function(NavigationNotification navigationNotification)?
onNavigationNotification,
/// GeneralLibraryFlutter
List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[],
/// GeneralLibraryFlutter
Widget Function(BuildContext context, Widget? widget)? builder,
/// GeneralLibraryFlutter
String title = '',
/// GeneralLibraryFlutter
String Function(BuildContext context)? onGenerateTitle,
/// GeneralLibraryFlutter
Color? color,
/// GeneralLibraryFlutter
ThemeData? theme,
/// GeneralLibraryFlutter
ThemeData? darkTheme,
/// GeneralLibraryFlutter
ThemeData? highContrastTheme,
/// GeneralLibraryFlutter
ThemeData? highContrastDarkTheme,
/// GeneralLibraryFlutter
ThemeMode? themeMode = ThemeMode.system,
/// GeneralLibraryFlutter
Duration themeAnimationDuration = kThemeAnimationDuration,
/// GeneralLibraryFlutter
Curve themeAnimationCurve = Curves.linear,
/// GeneralLibraryFlutter
Locale? locale,
/// GeneralLibraryFlutter
Iterable<LocalizationsDelegate<dynamic>>? localizationsDelegates,
/// GeneralLibraryFlutter
Locale? Function(List<Locale>? locales, Iterable<Locale> supportedLocales)?
localeListResolutionCallback,
/// GeneralLibraryFlutter
Locale? Function(Locale? locale, Iterable<Locale> supportedLocales)?
localeResolutionCallback,
/// GeneralLibraryFlutter
Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')],
/// GeneralLibraryFlutter
bool debugShowMaterialGrid = false,
/// GeneralLibraryFlutter
bool showPerformanceOverlay = false,
/// GeneralLibraryFlutter
bool checkerboardRasterCacheImages = false,
/// GeneralLibraryFlutter
bool checkerboardOffscreenLayers = false,
/// GeneralLibraryFlutter
bool showSemanticsDebugger = false,
/// GeneralLibraryFlutter
bool debugShowCheckedModeBanner = true,
/// GeneralLibraryFlutter
Map<ShortcutActivator, Intent>? shortcuts,
/// GeneralLibraryFlutter
Map<Type, Action<Intent>>? actions,
/// GeneralLibraryFlutter
String? restorationScopeId,
/// GeneralLibraryFlutter
ScrollBehavior? scrollBehavior,
/// GeneralLibraryFlutter
bool useInheritedMediaQuery = false,
/// GeneralLibraryFlutter
AnimationStyle? themeAnimationStyle,
}) {
return MaterialApp(
initialRoute: initialRoute,
onUnknownRoute: route,
key: key,
navigatorKey: navigatorKey,
scaffoldMessengerKey: scaffoldMessengerKey,
actions: actions,
// ignore: deprecated_member_use
useInheritedMediaQuery: useInheritedMediaQuery,
restorationScopeId: restorationScopeId,
localeResolutionCallback: localeResolutionCallback,
localeListResolutionCallback: localeListResolutionCallback,
checkerboardRasterCacheImages: checkerboardRasterCacheImages,
theme: theme,
themeAnimationCurve: themeAnimationCurve,
themeAnimationDuration: themeAnimationDuration,
themeAnimationStyle: themeAnimationStyle,
themeMode: themeMode,
title: title,
onGenerateTitle: onGenerateTitle,
onNavigationNotification: onNavigationNotification,
navigatorObservers: navigatorObservers,
checkerboardOffscreenLayers: checkerboardOffscreenLayers,
showPerformanceOverlay: showPerformanceOverlay,
scrollBehavior: scrollBehavior,
shortcuts: shortcuts,
showSemanticsDebugger: showSemanticsDebugger,
supportedLocales: supportedLocales,
darkTheme: darkTheme,
debugShowCheckedModeBanner: debugShowCheckedModeBanner,
debugShowMaterialGrid: debugShowMaterialGrid,
highContrastDarkTheme: highContrastDarkTheme,
localizationsDelegates: localizationsDelegates,
highContrastTheme: highContrastTheme,
home: home,
locale: locale,
color: color,
builder: builder,
);
}