ReduxNotifierTester<T> constructor

ReduxNotifierTester<T>({
  1. required ReduxNotifier<T> notifier,
  2. bool runInitialAction = false,
  3. T? initialState,
})

Implementation

ReduxNotifierTester({
  required this.notifier,
  bool runInitialAction = false,
  T? initialState,
}) {
  if (initialState != null) {
    notifier._state = initialState;
  } else {
    notifier._state = notifier.init();
  }

  if (runInitialAction) {
    notifier.postInit();
  }
}