didAddProvider method

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

A provider was initialized, and the value exposed is value.

value will be null if the provider threw during initialization.

Implementation

@override
@mustCallSuper
void didAddProvider(
  ProviderBase<Object?> provider,
  Object? value,
  ProviderContainer container,
) {
  super.didAddProvider(provider, value, container);
  if (!settings.enabled || !settings.printProviderAdded) {
    return;
  }
  final accepted = settings.providerFilter?.call(provider) ?? true;
  if (!accepted) {
    return;
  }
  _talker.logTyped(
    RiverpodAddLog(
      provider: provider,
      value: value,
      settings: settings,
    ),
  );
}