M3EMaterialApp class

A MaterialApp wired to adaptive M3ETheme with minimal integration code.

Owns platform-brightness observation, M3EThemeController lifecycle, and keeps Material ThemeMode aligned with the resolved M3E brightness.

System status and navigation bars are transparent. Icon brightness follows the active M3E theme and updates when the theme switches.

themeMode and the core MaterialApp.builder are managed internally. Use appBuilder to wrap the themed subtree when extra integration layers are needed.

Inheritance

Constructors

M3EMaterialApp({required M3EThemeData data, required Widget home, bool? autoTheming, bool? dynamicColoring, Brightness? initialTheme, M3EThemeController? controller, bool drawUnderSystemBars = false, GlobalKey<NavigatorState>? navigatorKey, GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey, Map<String, WidgetBuilder> routes = const <String, WidgetBuilder>{}, String? initialRoute, RouteFactory? onGenerateRoute, InitialRouteListFactory? onGenerateInitialRoutes, RouteFactory? onUnknownRoute, NotificationListenerCallback<NavigationNotification>? onNavigationNotification, List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[], TransitionBuilder? appBuilder, String title = '', GenerateAppTitle? onGenerateTitle, Color? color, ThemeData? theme, ThemeData? darkTheme, ThemeData? highContrastTheme, ThemeData? highContrastDarkTheme, Duration themeAnimationDuration = kThemeAnimationDuration, Curve themeAnimationCurve = Curves.linear, Locale? locale, 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<ShortcutActivator, Intent>? shortcuts, Map<Type, Action<Intent>>? actions, String? restorationScopeId, ScrollBehavior? scrollBehavior, AnimationStyle? themeAnimationStyle, Key? key})
Creates a Material app wired to adaptive M3ETheme.
const

Properties

actions Map<Type, Action<Intent>>?
Default map of intent types to actions.
final
appBuilder TransitionBuilder?
Optional wrapper applied after M3ETheme in the internal MaterialApp.builder.
final
autoTheming bool?
When true, follows platform brightness.
final
checkerboardOffscreenLayers bool
Checkerboards layers rendered to offscreen bitmaps.
final
checkerboardRasterCacheImages bool
Checkerboards images to diagnose raster cache.
final
color Color?
Primary color used for operating system UI.
final
controller M3EThemeController?
Optional controller for manual brightness overrides.
final
darkTheme ThemeData?
Optional Material dark theme override. Defaults to data.deriveDarkTemplate().toThemeData.
final
data M3EThemeData
Expressive theme tokens for the app.
final
debugShowCheckedModeBanner bool
Shows the debug banner in checked mode.
final
debugShowMaterialGrid bool
Turns on a grid overlay for debugging.
final
drawUnderSystemBars bool
When true, enables edge-to-edge layout so app content draws under transparent system bars. When false, system bars remain transparent but default layout insets apply.
final
dynamicColoring bool?
When true, applies device dynamic color.
final
hashCode int
The hash code for this object.
no setterinherited
highContrastDarkTheme ThemeData?
Optional high-contrast dark Material theme.
final
highContrastTheme ThemeData?
Optional high-contrast light Material theme.
final
home Widget
The default route widget.
final
initialRoute String?
Name of the first route to show.
final
initialTheme Brightness?
Initial brightness when not following the system.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
Initial locale for the app.
final
localeListResolutionCallback LocaleListResolutionCallback?
Resolves the locale from the device locale list.
final
localeResolutionCallback LocaleResolutionCallback?
Resolves the locale from the device locale.
final
localizationsDelegates Iterable<LocalizationsDelegate>?
Delegates for localizing the app.
final
Key for the root navigator.
final
Observers for the root navigator.
final
onGenerateInitialRoutes InitialRouteListFactory?
Called to generate initial routes.
final
onGenerateRoute RouteFactory?
Called to generate a route for a given RouteSettings.
final
onGenerateTitle GenerateAppTitle?
Callback to generate the app title.
final
onNavigationNotification NotificationListenerCallback<NavigationNotification>?
Called when a navigation notification is received.
final
onUnknownRoute RouteFactory?
Called when onGenerateRoute fails to generate a route.
final
restorationScopeId String?
Restoration ID for state restoration.
final
routes Map<String, WidgetBuilder>
Named routes table.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldMessengerKey GlobalKey<ScaffoldMessengerState>?
Key for the root scaffold messenger.
final
scrollBehavior ScrollBehavior?
Scroll behavior for the app.
final
shortcuts Map<ShortcutActivator, Intent>?
Default map of shortcuts to intents.
final
showPerformanceOverlay bool
Turns on the performance overlay.
final
showSemanticsDebugger bool
Turns on an overlay showing accessibility info.
final
supportedLocales Iterable<Locale>
Locales this app supports.
final
theme ThemeData?
Optional Material light theme override. Defaults to data.toThemeData.
final
themeAnimationCurve Curve
Curve of theme change animations.
final
themeAnimationDuration Duration
Duration of theme change animations.
final
themeAnimationStyle AnimationStyle?
Animation style for theme changes.
final
title String
A one-line description used by the device for this app.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<M3EMaterialApp>
Creates the mutable state for this widget.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited