InjectedImpRedoPersistState<T> constructor

InjectedImpRedoPersistState<T>({
  1. required Object? creator(),
  2. required T? initialState,
  3. required SideEffects<T>? sideEffects,
  4. required StateInterceptor<T>? stateInterceptor,
  5. required bool autoDisposeWhenNotUsed,
  6. required String? debugPrintWhenNotifiedPreMessage,
  7. required Object? toDebugString(
    1. T?
    )?,
  8. required int undoStackLength,
  9. required PersistState<T> persist()?,
  10. required DependsOn<T>? dependsOn,
  11. required Object? watch(
    1. 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(),
    );
  }
}