ConfigModule class
A ControlModule that integrates control_config with the ControlFactory.
This module ensures that ControlPrefs is initialized and available through
the ControlFactory during the application's startup.
By registering ConfigModule, SharedPreferences becomes accessible
globally via PrefsProvider.instance or Control.get<ControlPrefs>().
- Inheritance
-
- Object
- ControlModule<
ControlPrefs> - ConfigModule
- Implemented types
-
- Comparable<
ControlModule>
- Comparable<
Constructors
Properties
- entries → Map
-
A map of singleton instances to be registered in the
ControlFactory.no setterinherited -
factories
→ Map<
Type, InitFactory> -
A map of factory functions for lazy object creation, to be registered in the
ControlFactory.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
Returns
trueif the module's primary object (module) has been instantiated.no setterinherited - key → Type
-
The primary type key for this module.
no setterinherited
- module ↔ ControlPrefs?
-
The instance of the main object provided by this module.
getter/setter pairinherited
- preInit → bool
-
If
true, the module'sinit()method is awaited before other modules begin their initialization.no setterinherited - priority ↔ int
-
Sets a high priority to ensure
ControlPrefsis initialized early.getter/setter pairinherited-setteroverride-getter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subModules
→ Map<
Type, InitFactory> -
A map of other
ControlModuletypes that this module depends on.no setterinherited
Methods
-
compareTo(
ControlModule other) → int -
Compares this object to another object.
inherited
-
getInactiveSubmodules(
ControlFactory factory, {Map? args}) → List< ControlModule> -
inherited
-
init(
) → Future -
Asynchronously mounts (initializes)
SharedPreferences.override -
initModule(
) → void -
Initializes the module by either retrieving an existing ControlPrefs
instance from the
ControlFactoryor creating a new one if not present.override -
initStore(
ControlFactory factory, {bool includeSubModules = false}) → void -
Manually registers the module's
entriesandfactoriesinto a givenControlFactory.inherited -
initWithSubModules(
ControlFactory factory, {Map? args}) → Future -
inherited
-
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 Methods
-
standalone(
) → bool -
Initializes
control_configas a standalone module ifControlFactoryis not yet initialized.