recordError method

  1. @override
Future<void> recordError({
  1. required String exception,
  2. required String information,
  3. required String? reason,
  4. bool fatal = false,
  5. String? buildId,
  6. List<Map<String, String>>? stackTraceElements,
})
override

Submits a Crashlytics report of a caught error.

Implementation

@override
Future<void> recordError({
  required String exception,
  required String information,
  required String? reason,
  bool fatal = false,
  String? buildId,
  List<Map<String, String>>? stackTraceElements,
}) async {
  try {
    await channel
        .invokeMethod<void>('Crashlytics#recordError', <String, dynamic>{
      'exception': exception,
      'information': information,
      'reason': reason,
      'fatal': fatal,
      'buildId': buildId ?? '',
      'stackTraceElements': stackTraceElements ?? [],
    });
  } on PlatformException catch (e, s) {
    convertPlatformException(e, s);
  }
}