App class
This class is available throughout the app Readily supply properties about the App.
Constructors
- App({FlutterExceptionHandler? errorHandler, ErrorWidgetBuilder? errorScreen, ReportErrorHandler? errorReport, bool allowNewHandlers = true})
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addConnectivityListener(
ConnectivityListener? listener) → bool - Add a Connectivity listener.
-
dispose(
) → void - Dispose the App properties.
-
initInternal(
) → Future< void> - Internal Initialization routines.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onAsyncError(
AsyncSnapshot< bool> snapshot) → void - App-level error handling if async operation at start up fails
-
setAppState(
AppState? vw) → bool - Assign the class with the AppState object.
-
setAppStatefulWidget(
AppStatefulWidget appWidget) → bool - Assign the AppStateful object
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- appName → String?
-
The Name of the App.
no setter
- builder ↔ TransitionBuilder?
-
if neither routes, or onGenerateRoute was passed.
getter/setter pair
- buildNumber → String?
-
The build number of the App.
no setter
- checkerboardOffscreenLayers ↔ bool?
-
Checkerboard layers rendered offscreen bitmaps.
getter/setter pair
- checkerboardRasterCacheImages ↔ bool?
-
Checkerboard raster cache to speed up overall rendering.
getter/setter pair
- color ↔ Color?
-
Returns the Color passed to the App's View.
getter/setter pair
- connectivity → String?
-
Returns the connection status of the device.
no setter
- context → BuildContext?
-
The BuildContext for the App's View.
no setter
- debugPaintBaselinesEnabled ↔ bool?
-
RenderBox paints a line at its baselines.
getter/setter pair
- debugPaintLayerBordersEnabled ↔ bool?
-
Layer paints a box around its bound.
getter/setter pair
- debugPaintPointersEnabled ↔ bool?
-
Objects flash while they are being tapped.
getter/setter pair
- debugPaintSizeEnabled ↔ bool?
-
Each RenderBox to paint a box around its bounds.
getter/setter pair
- debugRepaintRainbowEnabled ↔ bool?
-
Overlay a rotating set of colors when repainting layers in checked mode.
getter/setter pair
- debugShowCheckedModeBanner ↔ bool?
-
Shows a little "DEBUG" banner in checked mode.
getter/setter pair
- debugShowMaterialGrid ↔ bool?
-
If true, it paints a grid overlay on Material apps.
getter/setter pair
- errorHandler → AppErrorHandler?
-
no setter
- filesDir → String?
-
The local directory for this App.
no setter
- hotReload ↔ bool
-
Flag to set hot reload from now on.
getter/setter pair
- inDebugger → bool
-
Determines if running in an IDE or in production.
no setter
- initialRoute ↔ String?
-
Returns to the initial route used by the App's View.
getter/setter pair
- installNum → String?
-
The id for this App's particular installation.
no setter
- iOSTheme ↔ CupertinoThemeData?
-
The Apps's current Cupertino theme.
getter/setter pair
- isInit ↔ bool?
-
Determine if the App initialized successfully.
getter/setter pair
- isOnline → bool
-
Indicates if the app has access to the Internet.
no setter
- locale ↔ Locale?
-
Returns the App's current locale.
getter/setter pair
- localeResolutionCallback ↔ LocaleResolutionCallback?
-
Resolves the App's locale.
getter/setter pair
-
localizationsDelegates
↔ Iterable<
LocalizationsDelegate> ? -
Returns the App's current localizations delegates.
getter/setter pair
-
Return the navigator key used by the App's View.
getter/setter pair
-
The list of observers for the Navigator for this app.
getter/setter pair
- onGenerateRoute ↔ RouteFactory?
-
The route generator used when the app is navigated to a named route.
getter/setter pair
- onGenerateTitle ↔ GenerateAppTitle?
-
Routine used to generate the App's title.
getter/setter pair
- onUnknownRoute ↔ RouteFactory?
-
Called when onGenerateRoute fails except for the initialRoute.
getter/setter pair
- packageName → String?
-
The 'Package Name' of the App.
no setter
- platform → TargetPlatform?
-
The running platform
no setter
-
routes
↔ Map<
String, WidgetBuilder> ? -
Returns the routes used by the App's View.
getter/setter pair
- scaffold → ScaffoldState
-
The Scaffold object for this App's View.
no setter
-
scaffoldMessengerKey
↔ GlobalKey<
ScaffoldMessengerState> ? -
Return the navigator key used by the App's View.
getter/setter pair
- screenHeight → double
-
The Logical height of the screen
no setter
- screenPhysicalHeight → double
-
The Physical height of the screen
no setter
- screenPhysicalWidth → double
-
The Physical width of the screen
no setter
- screenWidth → double
-
The logical width of the screen
no setter
- showPerformanceOverlay ↔ bool?
-
If true, it turns on a performance overlay.
getter/setter pair
- showSemanticsDebugger ↔ bool?
-
Shows an overlay of accessibility information
getter/setter pair
-
supportedLocales
↔ Iterable<
Locale> ? -
Returns an iteration of the App's locales.
getter/setter pair
- themeData ↔ ThemeData?
-
The App's current Material theme.
getter/setter pair
- title ↔ String?
-
Returns the title for the App's View.
getter/setter pair
- useCupertino → bool
-
Indicates if the App is running the Cupertino interface theme.
no setter
- useMaterial → bool
-
Indicates if the App is running the Material interface theme.
no setter
- version → String?
-
The current version of the App.
no setter
- vw → AppState?
-
The App State object.
no setter
-
widgetsAppKey
→ GlobalKey<
State< StatefulWidget> > -
More efficient widget tree rebuilds
final
Static Methods
-
catchError(
Object ex) → void - Catch and explicitly handle the error.
-
changeUI(
String ui) → void - Explicitly change to a particular interface.
-
clearConnectivityListener(
) → void - Clear Connectivity listeners.
-
getDeviceInfo(
) → Future< void> - Collect the device's information.
-
getInstallNum(
) → Future< String?> - The id for this App's particular installation.
-
onError(
FlutterErrorDetails details) → void - App-level error handling.
-
refresh(
) → void - Refresh the root State object, AppView.
-
removeConnectivityListener(
ConnectivityListener? listener) → bool - Remove a Connectivity listener.
-
setThemeData(
[ColorSwatch< int?> ? value]) → ColorSwatch<int?> ? -
snackBar(
{Key? key, required Widget content, Color? backgroundColor, double? elevation, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, double? width, ShapeBorder? shape, SnackBarBehavior? behavior, SnackBarAction? action, Duration? duration, Animation< double> ? animation, VoidCallback? onVisible, DismissDirection dismissDirection = DismissDirection.down}) → void - Display the SnackBar