TenantAwareStore class
Multi-tenant store with isolated state per tenant
Constructors
Properties
- currentContext → TenantContext?
-
Get current tenant context
no setter
- currentTenantId → String?
-
Get current tenant ID
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addGlobalMiddleware(
Middleware middleware) → void - Add global middleware (applied to all tenants)
-
addMiddleware(
Middleware middleware) → void - Add middleware to current tenant
-
clearAll(
) → void - Clear all tenants
-
clearCurrentTenant(
) → void - Clear current tenant
-
clearTenant(
String tenantId) → void - Clear tenant data
-
dispatch<
T> (Action action) → Future< T> - Dispatch action for current tenant
-
get<
T> () → T - Get service for current tenant
-
getAllTenantIds(
) → List< String> - Get all tenant IDs
-
getState<
T> (String key) → Rx< T> - Get state for current tenant
-
getTenantContext(
String tenantId) → TenantContext? - Get tenant context
-
getTenantCount(
) → int - Get tenant count
-
has<
T> () → bool - Check if service exists for current tenant
-
hasState(
String key) → bool - Check if state exists for current tenant
-
hasTenant(
String tenantId) → bool - Check if tenant exists
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register<
T> (T service) → void - Register service for current tenant
-
registerState<
T> (String key, Rx< T> state) → void - Register state for current tenant
-
setTenant(
String tenantId, {TenantContext? context}) → void - Set current tenant
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
T> () → void - Unregister service for current tenant
-
updateTenantContext(
String tenantId, TenantContext context) → void - Update tenant context
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited