Config class

Class that handles the app config.

It is possible to determine the platform and get the directory path synchronously.

Execute initialize() when the application starts.

await Config.initialize();

You can check whether it is initialized or not by isInitialized.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

androidDeviceInfo → AndroidDeviceInfo?
Android device information.
no setter
documentDirectory String
The directory where you want to save the document file.
no setter
flavor String
Get the flavor of the app.
no setter
isAndroid bool
True for Android apps.
no setter
isDebug bool
True if it is debug mode.
no setter
isDesktop bool
True for desktop.
no setter
isDesktopWeb bool
True for desktop web.
no setter
isEnabledMockup bool
True if mockup is enabled.
no setter
isInitialized bool
True if the config has been initialized.
no setter
isIOS bool
True for IOS apps.
no setter
isMobile bool
True for mobile.
no setter
isMobileWeb bool
True for mobile web.
no setter
isoDeviceInfo → IosDeviceInfo?
IOS device information.
no setter
isRelease bool
True if it is release mode.
no setter
isWeb bool
True if it is web.
no setter
libraryDirectory String
The directory where you want to save the library file.
no setter
locale String
Locale name.
no setter
maxCacheImage int
The number of images to cache in memory.
no setter
onUserStateChanged UserStateChangedCallback
Callback called when the user's state is changed.
final
packageInfo → PackageInfo?
Package information.
no setter
temporaryDirectory String
The directory that stores temporary files.
no setter
uid String
Get the UniqueID of the device.
no setter

Static Methods

checkConnectivity({VoidCallback? onConnected, VoidCallback? onDisconnected}) Future<ConnectivityResult>
Check the connection status.
initialize({required String flavor, bool enableMockup = false, int maxCacheImage = 30}) Future<void>
Initialize the configuration.