const
Widget.materialApp(- {Key? key,
- Widget? home,
- String? initialRoute,
- @Default('') String title,
- Color? color,
- ThemeData? theme,
- ThemeData? darkTheme,
- ThemeData? highContrastTheme,
- ThemeData? highContrastDarkTheme,
- @Default(ThemeMode.system) ThemeMode? themeMode,
- @Default(Duration(milliseconds: 200)) Duration themeAnimationDuration,
- @Default(Curves.linear()) Curves themeAnimationCurve,
- Locale? locale,
- @Default([Locale('en', 'US')]) Iterable<Locale> supportedLocales,
- @Default(false) bool debugShowMaterialGrid,
- @Default(false) bool showPerformanceOverlay,
- @Default(false) bool checkerboardRasterCacheImages,
- @Default(false) bool checkerboardOffscreenLayers,
- @Default(false) bool showSemanticsDebugger,
- @Default(true) bool debugShowCheckedModeBanner,
- String? restorationScopeId,
- @Default(false) bool useInheritedMediaQuery,
- @Default({}) Map<String, Widget> routes}
)
Implementation
const factory Widget.materialApp({
Key? key,
Widget? home,
String? initialRoute,
@Default('') String title,
Color? color,
ThemeData? theme,
ThemeData? darkTheme,
ThemeData? highContrastTheme,
ThemeData? highContrastDarkTheme,
@Default(ThemeMode.system) ThemeMode? themeMode,
@Default(Duration(milliseconds: 200)) Duration themeAnimationDuration,
@Default(Curves.linear()) Curves themeAnimationCurve,
Locale? locale,
@Default([Locale('en', 'US')]) Iterable<Locale> supportedLocales,
@Default(false) bool debugShowMaterialGrid,
@Default(false) bool showPerformanceOverlay,
@Default(false) bool checkerboardRasterCacheImages,
@Default(false) bool checkerboardOffscreenLayers,
@Default(false) bool showSemanticsDebugger,
@Default(true) bool debugShowCheckedModeBanner,
String? restorationScopeId,
@Default(false) bool useInheritedMediaQuery,
@Default({}) Map<String, Widget> routes,
}) = MaterialApp;