Store<St> constructor Null safety

Store<St>(
  1. {required St initialState,
  2. bool syncStream = false,
  3. TestInfoPrinter? testInfoPrinter,
  4. List<ActionObserver>? actionObservers,
  5. List<StateObserver>? stateObservers,
  6. Persistor? persistor,
  7. ModelObserver? modelObserver,
  8. ErrorObserver? errorObserver,
  9. WrapError? wrapError,
  10. bool? defaultDistinct,
  11. CompareBy? immutableCollectionEquality}
)

Implementation

Store({
  required St initialState,
  bool syncStream = false,
  TestInfoPrinter? testInfoPrinter,
  List<ActionObserver>? actionObservers,
  List<StateObserver>? stateObservers,
  Persistor? persistor,
  ModelObserver? modelObserver,
  ErrorObserver? errorObserver,
  WrapError? wrapError,
  bool? defaultDistinct,
  CompareBy? immutableCollectionEquality,
})  : _state = initialState,
      _stateTimestamp = DateTime.now().toUtc(),
      _changeController = StreamController.broadcast(sync: syncStream),
      _actionObservers = actionObservers,
      _stateObservers = stateObservers,
      _processPersistence = persistor == null
          ? //
          null
          : ProcessPersistence(persistor),
      _modelObserver = modelObserver,
      _errorObserver = errorObserver,
      _wrapError = wrapError,
      _defaultDistinct = defaultDistinct ?? true,
      _immutableCollectionEquality = immutableCollectionEquality,
      _errors = Queue<UserException>(),
      _dispatchCount = 0,
      _reduceCount = 0,
      _shutdown = false,
      _testInfoPrinter = testInfoPrinter,
      _testInfoController = (testInfoPrinter == null)
          ? //
          null
          : StreamController.broadcast(sync: syncStream);