import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:shared/utils/log_utils.dart'; class MyRiverpodObserver extends ProviderObserver { @override void didAddProvider( ProviderBase provider, Object? value, ProviderContainer container, ) { Log.d('Riverpod Provider Did Add -> $provider was initialized with $value'); } @override void didDisposeProvider( ProviderBase provider, ProviderContainer container, ) { Log.d('Riverpod Provider Did Dispose -> $provider was disposed'); } @override void didUpdateProvider( ProviderBase provider, Object? previousValue, Object? newValue, ProviderContainer container, ) { Log.d( 'Riverpod Provider Did Update -> $provider updated from $previousValue to $newValue', ); } @override void providerDidFail( ProviderBase provider, Object error, StackTrace stackTrace, ProviderContainer container, ) { Log.d('Riverpod Provider Did Fail -> $provider threw $error at $stackTrace'); } }