veilidchat/lib/log/state_logger.dart
Christien Rioux fe9d9f8aca lint work
2023-07-26 15:58:38 -04:00

23 lines
522 B
Dart

import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'loggy.dart';
class StateLogger extends ProviderObserver {
const StateLogger();
@override
void didUpdateProvider(
ProviderBase<Object?> provider,
Object? previousValue,
Object? newValue,
ProviderContainer container,
) {
log.debug('''
{
provider: ${provider.name ?? provider.runtimeType},
oldValue: $previousValue,
newValue: $newValue
}
''');
super.didUpdateProvider(provider, previousValue, newValue, container);
}
}