willCompute method

  1. @protected
  2. @mustCallSuper
Stream<S> willCompute()

The initializer to yield the current state before computation begins.

Implementation

@protected
@mustCallSuper
Stream<S> willCompute() async* {
  final (isValid, isDirty) = await retrieveCalculatorStateStatus();

  yield currentState.copyWith(
    isValid: isValid,
    isDirty: isDirty,
    isBusy: true,
  ) as S;
}