AppObject class
This class is available throughout the app Readily supplies static properties about the App.
- Mixed-in types
- Available extensions
Constructors
- AppObject({FlutterExceptionHandler? errorHandler, ErrorWidgetBuilder? errorScreen, ReportErrorHandler? errorReport, bool? allowNewHandlers = true})
-
Supply an error handler to the App.
factory
Properties
- appName → String?
-
The Name of the App.
no setterinherited
-
appState
↔ AppState<
StatefulWidget> ? -
The App State object.
getter/setter pair
- asSmallScreen → bool
-
Set whether the app is to use a 'small screen' or not.
no setter
- buildNumber → String?
-
The build number of the App.
no setterinherited
- connectivity → String?
-
Returns the connection status of the device.
no setter
- errorHandler → AppErrorHandler?
-
Returns the current Error Handler.
no setter
- filesDir → String?
-
The local directory for this App.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hotReload ↔ bool
-
Flag to set hot reload from now on.
getter/setter pair
- inFlutterTest → bool
-
Indicate if running under a 'Flutter Test' environment
no setter
- inSmallScreen → bool
-
Return the bool value indicating if running in a small screen or not.
no setter
- installNum → String?
-
The id for this App's particular installation.
no setter
- inWidgetsFlutterBinding → bool
-
Indicating app is running in the Flutter engine and not in
the
flutter_test
framework with TestWidgetsFlutterBinding for exampleno setter - iOSTheme ↔ CupertinoThemeData?
-
The Apps's current Cupertino theme.
getter/setter pairinherited
- isInit ↔ bool?
-
Determine if the App initialized successfully.
getter/setter pair
- isOnline → bool
-
Indicates if the app has access to the Internet.
Assume we're online if null
no setter
- mainWindow → FlutterView
-
Flutter application's main window.
no setter
-
A mutable menu
no setter
-
Use this to navigate throughout the your app
no setter
-
Return the navigator key used by the App's View.
final
- packageInfo → PackageInfo?
-
The package info.
no setterinherited
- packageName → String?
-
The 'Package Name' of the App.
no setterinherited
- platform → TargetPlatform?
-
The running platform
no setter
- router → NavigatorState
-
Merely another name for it.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaffold → ScaffoldState?
-
The Scaffold object for this App's View.
no setter
- 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
- screenSize → Size
-
Current Screen Size
no setter
- screenWidth → double
-
The logical width of the screen
no setter
- themeData ↔ ThemeData?
-
The App's current Material theme.
getter/setter pairinherited
- turnedOffInternet → bool
-
Was on but now turned off connectivity
no setter
- turnedOnInternet → bool
-
Was off but now turned on connectivity
no setter
- version → String?
-
The current version of the App.
no setterinherited
Methods
-
addConnectivityListener(
ConnectivityListener? listener) → bool - Add a Connectivity listener.
-
dispose(
) → void - Dispose the App properties.
-
getDeviceInfo(
) → Future< void> - Collect the device's information.
-
getInstallNum(
) → Future< String?> - The id for this App's particular installation.
-
getMaterialColor(
Color color) → MaterialColor -
inherited
-
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
-
onConnectivityChanged(
ConnectivityResult result) → void -
override
-
onError(
FlutterErrorDetails details) → void - App-level error handling.
-
removeConnectivityListener(
ConnectivityListener? listener) → bool - Remove a Connectivity listener.
-
setThemeData(
{ColorSwatch< int?> ? swatch, Color? color}) → Color? -
Set the App's general color theme supplying a Color value.
inherited
-
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, Clip? clipBehavior}) → void - Display the SnackBar
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited