import 'package:flutter/foundation.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';

class AppProviderObserver extends ProviderObserver {
  const AppProviderObserver();

  @override
  void providerDidFail(
    ProviderBase<Object?> provider,
    Object error,
    StackTrace stackTrace,
    ProviderContainer container,
  ) {
    debugPrint('[APP][PROVIDER_ERROR] ${provider.name ?? provider.runtimeType}: $error');
    debugPrintStack(stackTrace: stackTrace);
  }
}
