onResume method
A life-cycle for when a provider is listened again after it was paused (and onCancel was triggered).
See also:
- keepAlive, which can be combined with onCancel for advanced manipulation on when the provider should get disposed.
- Provider.autoDispose, a modifier which tell a provider that it should destroy its state when no longer listened to.
- onDispose, a life-cycle for when a provider is disposed.
- onCancel, a life-cycle for when all listeners of a provider are removed.
Implementation
@override
void onResume(void Function() cb) {
_onResumeListeners ??= [];
_onResumeListeners!.add(cb);
}