Catcher
Catcher intercepts unhandled Flutter and Dart exceptions so crashes don't fail silently in production. It collects stack traces and device metadata, then routes reports to your team's alerting channels.
Key Features
- Flexible Handlers: Send crash reports to Sentry, Crashlytics, Slack, Discord, Email, HTTP endpoints, local files, or console logs.
- Report Modes: Choose between Silent background reporting, Dialog prompts, or a full-screen crash page.
- Cross-Platform: Supports Android, iOS, Web, Linux, Windows, and macOS.
Installation
Add Catcher to your project:
flutter pub add catcher
Basic Usage
import 'package:flutter/material.dart';
import 'package:catcher/catcher.dart';
void main() {
final debugOptions = CatcherOptions(
DialogReportMode(),
[ConsoleHandler()],
);
Catcher(
rootWidget: const MyApp(),
debugConfig: debugOptions,
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
Widget build(BuildContext context) {
return MaterialApp(
navigatorKey: Catcher.navigatorKey,
home: const Scaffold(
body: Center(child: Text('App Content')),
),
);
}
}