didDisposeProvider method

  1. @override
  2. @mustCallSuper
void didDisposeProvider(
  1. ProviderBase<Object?> provider,
  2. ProviderContainer container
)

A provider was disposed

Implementation

@override
@mustCallSuper
void didDisposeProvider(
  ProviderBase<Object?> provider,
  ProviderContainer container,
) {
  super.didDisposeProvider(provider, container);
  if (!settings.enabled || !settings.printProviderDisposed) {
    return;
  }
  final accepted = settings.providerFilter?.call(provider) ?? true;
  if (!accepted) {
    return;
  }
  _talker.logCustom(
    RiverpodDisposeLog(
      provider: provider,
      settings: settings,
    ),
  );
}