dispose method

void dispose()

Release all the resources associated with this ProviderContainer.

This will destroy the state of all providers associated with this ProviderContainer and call Ref.onDispose listeners.

It is safe to call this method multiple times. Subsequent calls will be no-op.

If this container has non-disposed child ProviderContainers (cf parent), then this method will dispose those children first. Therefore, disposing the root ProviderContainer the entire graph.

Implementation

void dispose() => _dispose(updateChildren: true);