NativebrikCrashReport
Interface
class NativebrikCrashReport {
static NativebrikCrashReport get instance
Future<void> recordFlutterError(FlutterErrorDetails errorDetails)
Future<void> recordPlatformError(Object error, StackTrace stackTrace)
Usage
void main() {
runZonedGuarded(() {
WidgetsFlutterBinding.ensureInitialized();
// Initialize Nativebrik Client
NativebrikBridge("<PROJECT_ID>");
FlutterError.onError = (errorDetails) {
// here
NativebrikCrashReport.instance.recordFlutterError(errorDetails);
};
PlatformDispatcher.instance.onError = (error, stack) {
// here
NativebrikCrashReport.instance.recordPlatformError(error, stack);
return true;
};
// Run your app.
runApp(const MyApp());
}, (error, stack) {
// here
NativebrikCrashReport.instance.recordPlatformError(error, stack);
});
}
Last updated