Store class

Global store for dependency injection and state management

Constructors

Store()

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

addMiddleware(Middleware middleware) → void
Add middleware
cleanupNamespace(String namespace) → void
Cleanup state by namespace
cleanupUnused() → void
Cleanup unused state (removes all state - use with caution) Note: This removes all state regardless of listeners since hasListeners is not accessible from outside ChangeNotifier
clear() → void
Clear all registered services and state
dispatch<T>(Action action) Future<T>
Execute action through middleware chain
get<T>() → T
Get a registered service
getAllStateKeys() List<String>
Get all state keys
getState<T>(String key) Rx<T>
Get state
getStateKeysForNamespace(String namespace) List<String>
Get all state keys for a namespace
getStateWithNamespace<T>(String namespace, String key) Rx<T>
Get state with namespace
getUnusedStateKeys() List<String>
Get list of all state keys Note: Cannot determine unused state without access to hasListeners
has<T>() bool
Check if a service is registered
hasState(String key) bool
Check if state exists
hasStateWithNamespace(String namespace, String key) bool
Check if state exists with namespace
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register<T>(T service) → void
Register a service/controller
registerState<T>(String key, Rx<T> state) → void
Register state
registerStateWithNamespace<T>(String namespace, String key, Rx<T> state) → void
Register state with namespace
removeMiddleware(Middleware middleware) → void
Remove middleware
toString() String
A string representation of this object.
inherited
unregister<T>() → void
Unregister a service

Operators

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