setup static method
Future<void>
setup({
- List<
HummErrorTracker> ? trackers, - String? storageKey,
- HummErrorStorage? errorStorage,
- ErrorDisplayCallback? errorDisplayCallback,
- ErrorTranslationCallback? errorTranslationCallback,
- bool shouldDisplayErrorCallback(
- dynamic error,
- StackTrace stackTrace
- String? defaultErrorMessage,
- int? logSize,
Implementation
static Future<void> setup({
List<HummErrorTracker>? trackers,
String? storageKey,
HummErrorStorage? errorStorage,
ErrorDisplayCallback? errorDisplayCallback,
ErrorTranslationCallback? errorTranslationCallback,
bool Function(dynamic error, StackTrace stackTrace)? shouldDisplayErrorCallback,
String? defaultErrorMessage,
int? logSize,
}) async {
final handler = HummErrorHandler();
await handler.init(
storageKey: storageKey,
errorStorage: errorStorage,
trackers: trackers,
errorDisplayCallback: errorDisplayCallback,
errorTranslationCallback: errorTranslationCallback,
shouldDisplayErrorCallback: shouldDisplayErrorCallback,
defaultErrorMessage: defaultErrorMessage,
logSize: logSize,
);
// Configure Flutter error handling
handler.setupFlutterErrorHandling();
}