recordFlutterError method

Future<void> recordFlutterError(
  1. FlutterErrorDetails flutterErrorDetails, {
  2. bool fatal = false,
})

Submits a Crashlytics report of an error caught by the Flutter framework. Use fatal to indicate whether the error is a fatal or not.

Implementation

Future<void> recordFlutterError(FlutterErrorDetails flutterErrorDetails,
    {bool fatal = false}) {
  FlutterError.presentError(flutterErrorDetails);

  final information = flutterErrorDetails.informationCollector?.call() ?? [];

  return recordError(
    flutterErrorDetails.exceptionAsString(),
    flutterErrorDetails.stack,
    reason: flutterErrorDetails.context,
    information: information,
    printDetails: false,
    fatal: fatal,
  );
}