InjectedImpRedoPersistState<T> constructor
InjectedImpRedoPersistState<T> ({
- required Object? creator(),
- required T? initialState,
- required SideEffects<
T> ? sideEffects, - required StateInterceptor<
T> ? stateInterceptor, - required bool autoDisposeWhenNotUsed,
- required String? debugPrintWhenNotifiedPreMessage,
- required Object? toDebugString(
- T?
- required int undoStackLength,
- required PersistState<
T> persist()?, - required DependsOn<
T> ? dependsOn, - required Object? watch(
- T? s
Implementation
InjectedImpRedoPersistState({
required Object? Function() creator,
required T? initialState,
required SideEffects<T>? sideEffects,
required StateInterceptor<T>? stateInterceptor,
required bool autoDisposeWhenNotUsed,
required String? debugPrintWhenNotifiedPreMessage,
required Object? Function(T?)? toDebugString,
required int undoStackLength,
required PersistState<T> Function()? persist,
required DependsOn<T>? dependsOn,
required Object? Function(T? s)? watch,
}) : super(
creator: creator,
initialState: initialState,
sideEffectsGlobal: sideEffects,
stateInterceptor: stateInterceptor,
autoDisposeWhenNotUsed: autoDisposeWhenNotUsed,
debugPrintWhenNotifiedPreMessageGlobal:
debugPrintWhenNotifiedPreMessage,
toDebugString: toDebugString,
dependsOn: dependsOn,
watch: watch,
) {
if (persist != null || undoStackLength > 0) {
undoRedoPersistState = UndoRedoPersistState(
undoStackLength: undoStackLength,
persistanceProvider: persist?.call(),
);
}
}