asyncBarrier method Null safety

  1. @override
void asyncBarrier()
override

This is called during test execution before and after the body has been executed.

It's used by AutomatedTestWidgetsFlutterBinding to drain the microtasks before the final pump that happens during test cleanup.

Implementation

@override
void asyncBarrier() {
  assert(_currentFakeAsync != null);
  _currentFakeAsync!.flushMicrotasks();
  super.asyncBarrier();
}