Injected<T>.future constructor
Injected<T>.future ({
- required Future<
T> creator(), - T? initialState,
- SideEffects<
T> ? sideEffects, - StateInterceptor<
T> ? stateInterceptor, - bool autoDisposeWhenNotUsed = true,
- String? debugPrintWhenNotifiedPreMessage,
- Object? toDebugString(
- T?
- int undoStackLength = 0,
- PersistState<
T> persist()?, - DependsOn<
T> ? dependsOn, - bool isLazy = false,
Create an Injected state from future
Implementation
factory Injected.future({
required Future<T> Function() creator,
T? initialState,
SideEffects<T>? sideEffects,
StateInterceptor<T>? stateInterceptor,
bool autoDisposeWhenNotUsed = true,
String? debugPrintWhenNotifiedPreMessage,
Object? Function(T?)? toDebugString,
int undoStackLength = 0,
PersistState<T> Function()? persist,
DependsOn<T>? dependsOn,
bool isLazy = false,
}) {
final inj = Injected<T>.generic(
creator: creator,
initialState: initialState,
sideEffects: sideEffects,
stateInterceptor: stateInterceptor,
autoDisposeWhenNotUsed: autoDisposeWhenNotUsed,
debugPrintWhenNotifiedPreMessage: debugPrintWhenNotifiedPreMessage,
toDebugString: toDebugString,
undoStackLength: undoStackLength,
persist: persist,
dependsOn: dependsOn,
);
return inj;
}