flushPending method

Future<void> flushPending()

Implementation

Future<void> flushPending() async {
  // Drain until empty so screens recorded during an onScreenAdded callback
  // are not lost.
  while (_pendingScreens.isNotEmpty) {
    await _flushPendingScreen();
  }
}