didUpdateProvider method

void didUpdateProvider(
  1. ProviderBase provider,
  2. Object? previousValue,
  3. Object? newValue,
  4. ProviderContainer container

Called my providers when they emit a notification.

  • newValue will be null if the provider threw during initialization.
  • previousValue will be null if the previous build threw during initialization.


void didUpdateProvider(
  ProviderBase provider,
  Object? previousValue,
  Object? newValue,
  ProviderContainer container,
) {}