pump method

Future<void> pump()

Awaits for providers to rebuild/be disposed and for listeners to be notified.

This call is recursive and will wait for ancestor ProviderContainers to rebuild their providers too.

Implementation

Future<void> pump() async {
  final a = scheduler.pendingFuture;

  await Future.wait<void>([
    if (a != null) a,
    if (parent case final parent?) parent.pump(),
  ]);
}