BaseApp class
BaseApp theme, use cupertinoTheme by cupertino,use materialTheme by material. use CupertinoApp by cupertino not support CupertinoApp.router yet. *** use cupertino = { forceUseMaterial: true } force use MaterialApp/GetMaterialApp on cupertino. use MaterialApp or GetMaterialApp by material (controlled by useGetX parameter) not support MaterialApp.router yet. *** use material = { forceUseCupertino: true } force use CupertinoApp on material.
GetX Support: Set useGetX: true to enable GetMaterialApp with state management and routing
CupertinoApp: 2021.04.03 MaterialApp: 2021.04.02 GetMaterialApp: Added 2025.08.09 for GetX support modify 2021.06.25 by flutter 2.2.2
- Inheritance
Constructors
-
BaseApp({Key? key, Widget? home, Map<
String, WidgetBuilder> ? routes = const <String, WidgetBuilder>{}, String? initialRoute, RouteFactory? onGenerateRoute, InitialRouteListFactory? onGenerateInitialRoutes, RouteFactory? onUnknownRoute, TransitionBuilder? builder, String title = '', GenerateAppTitle? onGenerateTitle, Color? color, Locale? locale, Iterable<LocalizationsDelegate> ? localizationsDelegates, LocaleListResolutionCallback? localeListResolutionCallback, LocaleResolutionCallback? localeResolutionCallback, Iterable<Locale> supportedLocales = const <Locale>[Locale('en', 'US')], bool showPerformanceOverlay = false, bool checkerboardRasterCacheImages = false, bool checkerboardOffscreenLayers = false, bool showSemanticsDebugger = false, bool debugShowCheckedModeBanner = true, String? restorationScopeId, ScrollBehavior? scrollBehavior, BaseThemeData? baseTheme, ThemeData? lightTheme, ThemeData? darkTheme, Map<LogicalKeySet, Intent> ? shortcuts, Map<LocalKey, Action< ? actions, bool withoutSplashOnCupertino = true, GlobalKey<Intent> >ScaffoldMessengerState> ? scaffoldMessengerKey, ThemeMode? themeMode = ThemeMode.system, bool useMaterial3 = true, bool useGetX = false, List<GetPage> ? getPages, GetPage? unknownRoute, ValueChanged<Routing?> ? routingCallback, Transition? defaultTransition, Locale? getxLocale, Locale? fallbackLocale, Translations? translations, Bindings? initialBinding, SmartManagement smartManagement = SmartManagement.full, bool enableLog = kDebugMode, LogWriterCallback? logWriterCallback, bool debugShowMaterialGrid = false, BaseParam? baseParam}) -
const
Properties
-
actions
→ Map<
LocalKey, Action< ?Intent> > -
CupertinoApp.actions
or
MaterialApp.actions
final
- baseParam → BaseParam?
-
Personalization parameters, gets platform parameters first, then mode parameters
finalinherited
- baseTheme → BaseThemeData?
-
BaseThemeData
final
- builder → TransitionBuilder?
-
CupertinoApp.builder
or
MaterialApp.builder
final
- checkerboardOffscreenLayers → bool
-
CupertinoApp.checkerboardOffscreenLayers
or
MaterialApp.checkerboardOffscreenLayers
final
- checkerboardRasterCacheImages → bool
-
CupertinoApp.checkerboardRasterCacheImages
or
MaterialApp.checkerboardRasterCacheImages
final
- color → Color?
-
CupertinoApp.color
or
MaterialApp.color
final
- darkTheme → ThemeData?
-
MaterialApp.darkTheme - Dark theme for Material Design
Can be used as an alternative to baseTheme.materialDarkThemefinal - debugShowCheckedModeBanner → bool
-
CupertinoApp.debugShowCheckedModeBanner
or
MaterialApp.debugShowCheckedModeBanner
final
- debugShowMaterialGrid → bool
-
MaterialApp.debugShowMaterialGrid
final
- defaultTransition → Transition?
-
GetMaterialApp.defaultTransitionfinal - enableLog → bool
-
GetMaterialApp.enableLogfinal - fallbackLocale → Locale?
-
GetMaterialApp.fallbackLocalefinal -
getPages
→ List<
GetPage> ? -
GetMaterialApp.getPagesfinal - getxLocale → Locale?
-
GetMaterialApp.localefinal - hashCode → int
-
The hash code for this object.
no setterinherited
- home → Widget?
-
CupertinoApp.home
or
Material.homefinal - initialBinding → Bindings?
-
GetMaterialApp.initialBindingfinal - initialRoute → String?
-
CupertinoApp.initialRoute
or
MaterialApp.initialRoute
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lightTheme → ThemeData?
-
MaterialApp.theme - Light theme for Material Design
Can be used as an alternative to baseTheme.materialTheme
final
- locale → Locale?
-
CupertinoApp.locale
or
MaterialApp.locale
final
- localeListResolutionCallback → LocaleListResolutionCallback?
-
CupertinoApp.localeListResolutionCallback
or
MaterialApp.localeListResolutionCallback
final
- localeResolutionCallback → LocaleResolutionCallback?
-
CupertinoApp.localeResolutionCallback
or
MaterialApp.localeResolutionCallback
final
-
localizationsDelegates
→ Iterable<
LocalizationsDelegate> ? -
CupertinoApp.localizationsDelegates
or
MaterialApp.localizationsDelegates
final
- logWriterCallback → LogWriterCallback?
-
GetMaterialApp.logWriterCallbackfinal -
*** general properties start ***
CupertinoApp.navigatorKey
or
MaterialApp.navigatorKey
final
-
CupertinoApp.navigatorObservers
or
MaterialApp.navigatorObservers
final
- onGenerateInitialRoutes → InitialRouteListFactory?
-
CupertinoApp.onGenerateInitialRoutes
or
MaterialApp.onGenerateInitialRoutes
final
- onGenerateRoute → RouteFactory?
-
CupertinoApp.onGenerateRoute
or
MaterialApp.onGenerateRoute
final
- onGenerateTitle → GenerateAppTitle?
-
CupertinoApp.onGenerateTitle
or
MaterialApp.onGenerateTitle
final
- onUnknownRoute → RouteFactory?
-
CupertinoApp.onUnknownRoute
or
MaterialApp.onUnknownRoute
final
- restorationScopeId → String?
-
CupertinoApp.restorationScopeId
or
MaterialApp.restorationScopeId
final
-
routes
→ Map<
String, WidgetBuilder> ? -
CupertinoApp.routes
or
MaterialApp.routes
final
-
routingCallback
→ ValueChanged<
Routing?> ? -
GetMaterialApp.routingCallbackfinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scaffoldMessengerKey
→ GlobalKey<
ScaffoldMessengerState> ? -
*** cupertino properties end ***
*** material properties start ***
MaterialApp.scaffoldMessengerKey
final
- scrollBehavior → ScrollBehavior?
-
CupertinoApp.scrollBehavior
or
MaterialApp.scrollBehavior
final
-
shortcuts
→ Map<
LogicalKeySet, Intent> ? -
CupertinoApp.shortcuts
or
MaterialApp.shortcuts
final
- showPerformanceOverlay → bool
-
CupertinoApp.showPerformanceOverlay
or
MaterialApp.showPerformanceOverlay
final
- showSemanticsDebugger → bool
-
CupertinoApp.showSemanticsDebugger
or
MaterialApp.showSemanticsDebugger
final
- smartManagement → SmartManagement
-
GetMaterialApp.smartManagementfinal -
supportedLocales
→ Iterable<
Locale> -
CupertinoApp.supportedLocales
or
MaterialApp.supportedLocales
final
- themeMode → ThemeMode?
-
MaterialApp.themeMode
final
- title → String
-
CupertinoApp.title
or
MaterialApp.title
final
- translations → Translations?
-
GetMaterialApp.translationsfinal - unknownRoute → GetPage?
-
GetMaterialApp.unknownRoutefinal - useGetX → bool
-
*** material properties end ***
*** GetX properties start ***
Enable GetX functionality (GetMaterialApp instead of MaterialApp)
final
- useMaterial3 → bool
-
MaterialApp.useMaterial3- Enable Material 3 designfinal - withoutSplashOnCupertino → bool
-
*** general properties end ***
*** cupertino properties start ***
withoutSplashOnCupertino, default is true
final
Methods
-
beforeBuild(
BuildContext context) → void - *** GetX properties end ***
-
beforeBuildByCupertino(
BuildContext context) → void -
Called before buildByCupertino
inherited
-
beforeBuildByCupertinoNative(
BuildContext context) → void -
Called before buildByCupertinoNative (native iOS implementation)
inherited
-
beforeBuildByMaterial(
BuildContext context) → void -
Called before buildByMaterial
inherited
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
buildByCupertino(
BuildContext context) → Widget - build on cupertino mode (Flutter implementation)
-
buildByCupertinoNative(
BuildContext context) → dynamic -
build on cupertino mode with native iOS components (cupertino_native package)
This is called when baseParam.nativeIOS = true
Default implementation falls back to buildByCupertino()
inherited
-
buildByMaterial(
BuildContext context) → Widget - build on material mode
-
commonBuild(
BuildContext context, BaseParam? baseParam) → dynamic -
inherited
-
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
-
getBuildMode(
BaseParam? baseParam) → WidgetBuildMode -
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
-
valueOf(
String key, dynamic value) → dynamic -
inherited
-
valueOfBaseParam(
BaseParam? baseParam, String key, dynamic value) → dynamic -
No reflection available in Dart
First get value from platform, then from mode, finally from value itself
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited