onClose method
Runs close when the world closes or restarts — the last registered
first, as a stack unwinds. A failure is reported and the rest still run.
Implementation
void onClose(FutureOr<void> Function() close) => _closers.add(close);
Runs close when the world closes or restarts — the last registered
first, as a stack unwinds. A failure is reported and the rest still run.
void onClose(FutureOr<void> Function() close) => _closers.add(close);