registerDisposer method

void registerDisposer(
  1. FutureOr dispose()
)
override

Implementation

void registerDisposer(FutureOr dispose()) {
  onShutdown(() async {
    await dispose();
  });
}