KoreApp<NavigationInteractorType extends BaseNavigationInteractor<dynamic, dynamic, dynamic, RoutesBase, RoutesBase, RoutesBase, dynamic, dynamic, dynamic, BaseDeepLinksInteractor> > class
abstract
Main class for flutter_kore application
It contains global InstanceCollection and EventBus It performs initial setup for interactors, wrappers and parts (register builders for interactors and register singletons)
Do not forget to setup KoreApp.cacheGetDelegate and KoreApp.cachePutDelegate before calling initialize
@mainApp
class App extends KoreApp with AppGen {
static late SharedPreferences prefs;
@override
Future<void> initialize() async {
await super.initialize();
}
}
final app = App();
Future<void> initApp() async {
App.prefs = await SharedPreferences.getInstance();
KoreApp.cacheGetDelegate = (key) {
return App.prefs.getString(key) ?? '';
};
KoreApp.cachePutDelegate = (key, value) async {
return App.prefs.setString(key, value);
};
await app.initialize();
}
Constructors
- KoreApp()
Properties
- eventBus → EventBus
-
Main app event bus
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- instances → InstanceCollection
-
Main app instances collection
final
- isInitialized → bool
-
Flag indicating that all kore instances are created and registered
no setter
-
Navigation interactor for this app
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
singletonInstances
→ List<
Connector> -
Collection of singletion instances
no setter
Methods
-
createSingletons(
) → Future< void> -
initialize(
) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerInstances(
) → void - Method to register builders for instances
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- cacheGetDelegate ↔ LocaleCacheGetDelegate
-
Delegate function to get data from cache library
getter/setter pair
- cachePutDelegate ↔ LocaleCachePutDelegate
-
Delegate function to put data to cache library
getter/setter pair
- isInTestMode ↔ bool
-
Flag indicating test mode
getter/setter pair
-
Navigation interactor for this app
final