GetMaterialApp<T> class

A MaterialApp extension that integrates the Refreshed state management library.

This widget is similar to MaterialApp, but with additional features provided by Refreshed, such as reactive state management, dependency injection, and navigation management.

Inheritance

Constructors

GetMaterialApp({Key? key, GlobalKey<NavigatorState>? navigatorKey, 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, List<NavigatorObserver> navigatorObservers = const <NavigatorObserver>[], 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<String, String>>? translationsKeys, Translations? translations, VoidCallback? onInit, VoidCallback? onReady, VoidCallback? onDispose, ValueChanged<Routing?>? routingCallback, Transition? defaultTransition, List<GetPage<T>>? getPages, bool? opaqueRoute, bool? enableLog = kDebugMode, LogWriterCallback? logWriterCallback, bool? popGesture, Duration? transitionDuration, bool? defaultGlobalState, SmartManagement smartManagement = SmartManagement.full, List<Bind<T>>? binds, GetPage<T>? unknownRoute, ThemeData? highContrastTheme, ThemeData? highContrastDarkTheme, Map<Type, Action<Intent>>? actions})
Constructs a GetMaterialApp widget.
const
GetMaterialApp.router({Key? key, RouteInformationProvider? routeInformationProvider, GlobalKey<ScaffoldMessengerState>? scaffoldMessengerKey, RouteInformationParser<Object>? routeInformationParser, RouterDelegate<Object>? routerDelegate, RouterConfig<Object>? routerConfig, BackButtonDispatcher? backButtonDispatcher, TransitionBuilder? builder, String title = "", GenerateAppTitle? onGenerateTitle, Color? color, ThemeData? theme, ThemeData? darkTheme, bool useInheritedMediaQuery = false, ThemeData? highContrastTheme, ThemeData? highContrastDarkTheme, ThemeMode themeMode = ThemeMode.system, 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<LogicalKeySet, Intent>? shortcuts, ScrollBehavior? scrollBehavior, Map<Type, Action<Intent>>? actions, CustomTransition? customTransition, Map<String, Map<String, String>>? translationsKeys, Translations? translations, TextDirection? textDirection, Locale? fallbackLocale, ValueChanged<Routing?>? routingCallback, Transition? defaultTransition, bool? opaqueRoute, VoidCallback? onInit, VoidCallback? onReady, VoidCallback? onDispose, bool? enableLog = kDebugMode, LogWriterCallback? logWriterCallback, bool? popGesture, SmartManagement smartManagement = SmartManagement.full, List<Bind<T>>? binds, Duration? transitionDuration, bool? defaultGlobalState, List<GetPage<T>>? getPages, List<NavigatorObserver>? navigatorObservers, GetPage<T>? unknownRoute})
Constructs a GetMaterialApp widget with router configuration.
const

Properties

actions Map<Type, Action<Intent>>?
The actions for the app.
final
backButtonDispatcher BackButtonDispatcher?
The back button dispatcher for the app.
final
binds List<Bind<T>>?
The bindings for the app.
final
builder TransitionBuilder?
A builder function to customize transitions between routes.
final
checkerboardOffscreenLayers bool
Whether to checkerboard offscreen layers.
final
checkerboardRasterCacheImages bool
Whether to checkerboard raster cache images.
final
color Color?
The primary color of the app.
final
customTransition CustomTransition?
A custom transition configuration for route transitions.
final
darkTheme ThemeData?
The theme data to use when the device's theme mode is dark.
final
debugShowCheckedModeBanner bool
Whether to show the checked mode banner.
final
debugShowMaterialGrid bool
Whether to show material grid in debug mode.
final
defaultGlobalState bool?
Whether to use default global state.
final
defaultTransition Transition?
The default transition for page transitions.
final
enableLog bool?
Whether logging is enabled.
final
fallbackLocale Locale?
The fallback locale for the app's localization.
final
getPages List<GetPage<T>>?
The pages for the app's navigation.
final
hashCode int
The hash code for this object.
no setterinherited
highContrastDarkTheme ThemeData?
The high contrast dark theme data for the app.
final
highContrastTheme ThemeData?
The high contrast theme data for the app.
final
home Widget?
The default widget to show when the app is first run.
final
initialRoute String?
The name of the initial route the app should navigate to.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
locale Locale?
The locale for the app's localization.
final
localeListResolutionCallback LocaleListResolutionCallback?
A callback to resolve the locale list.
final
localeResolutionCallback LocaleResolutionCallback?
A callback to resolve the locale.
final
localizationsDelegates Iterable<LocalizationsDelegate>?
The delegates for localizations in the app.
final
logWriterCallback LogWriterCallback?
A callback for writing logs.
final
A key to identify the navigator state.
final
A list of observers for navigation events.
final
onDispose VoidCallback?
A callback for when the app is disposed.
final
onGenerateInitialRoutes InitialRouteListFactory?
A function that generates a list of initial routes for navigation.
final
onGenerateRoute RouteFactory?
A function that generates routes for navigation.
final
onGenerateTitle GenerateAppTitle?
A function to generate the app's title dynamically.
final
onInit VoidCallback?
A callback for initializing the app.
final
onReady VoidCallback?
A callback for when the app is ready.
final
onUnknownRoute RouteFactory?
A function that generates a route when no other route matches.
final
opaqueRoute bool?
Whether the routes are opaque.
final
popGesture bool?
Whether to enable pop gesture.
final
routeInformationParser RouteInformationParser<Object>?
The route information parser for the app.
final
routeInformationProvider RouteInformationProvider?
The route information provider for the app.
final
routerConfig RouterConfig<Object>?
The router config for the app.
final
routerDelegate RouterDelegate<Object>?
The router delegate for the app.
final
routes Map<String, WidgetBuilder>?
A map of named routes and their corresponding builder functions.
final
routingCallback ValueChanged<Routing?>?
A callback for routing events.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaffoldMessengerKey GlobalKey<ScaffoldMessengerState>?
A key to identify the scaffold messenger state.
final
scrollBehavior ScrollBehavior?
The scroll behavior for the app's scrolling widgets.
final
shortcuts Map<LogicalKeySet, Intent>?
A map of shortcuts for keyboard shortcuts.
final
showPerformanceOverlay bool
Whether to show performance overlay.
final
showSemanticsDebugger bool
Whether to show semantics debugger.
final
smartManagement SmartManagement
The smart management strategy for the app.
final
supportedLocales Iterable<Locale>
The supported locales for the app's localization.
final
textDirection TextDirection?
The text direction for the app's layout.
final
theme ThemeData?
The theme data to use when the device's theme mode is light.
final
themeMode ThemeMode
The theme mode to use for the app.
final
title String
The title of the app, displayed in the device's title bar.
final
transitionDuration Duration?
The transition duration for page transitions.
final
translations Translations?
The translations object for localization.
final
translationsKeys Map<String, Map<String, String>>?
A map of translations keys for localization.
final
unknownRoute GetPage<T>?
The unknown route for the app.
final
useInheritedMediaQuery bool
Whether to use inherited media query.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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}) 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