withAtomicUpdate method

Future<void> withAtomicUpdate(
  1. FutureOr<void> bloc()
)

Implementation

Future<void> withAtomicUpdate(FutureOr<void> Function() bloc) async {
  final state = _currentState;
  if (state != null) {
    state._startAtomicUpdate();
    await bloc();
    state._endAtomicUpdate();
  }
}