keepAlive abstract method

KeepAliveLink keepAlive()

Requests for the state of a provider to not be disposed when all the listeners of the provider are removed.

Returns an object which allows cancelling this operation, therefore allowing the provider to dispose itself when all listeners are removed.

If keepAlive is invoked multiple times, all KeepAliveLink will have to be closed for the provider to dispose itself when all listeners are removed.

Note: This is only useful if your provider is using "auto dispose". If your provider is not using "auto dispose", then this method has no effect.

Note: A provider that is kept alive may still be paused. If a provider is not listened, regardless of whether it is kept alive or not, the provider won't rebuild when using watch until it is listened to again.

Implementation

KeepAliveLink keepAlive();