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

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
isRelease bool
True if it is release mode.
no setter
isWeb bool
True if it is web.
no setter
onUserStateChanged UserStateChangedCallback
Callback called when the user's state is changed.
final
uid String
Get the UniqueID of the device.
no setter

Static Methods

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