recordError method

  1. @override
Future<void> recordError({
  1. required String exception,
  2. required String information,
  3. required String reason,
  4. 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,
  List<Map<String, String>>? stackTraceElements,
}) async {
  try {
    await channel
        .invokeMethod<void>('Crashlytics#recordError', <String, dynamic>{
      'exception': exception,
      'information': information,
      'reason': reason,
      'stackTraceElements': stackTraceElements ?? [],
    });
  } on PlatformException catch (e, s) {
    throw platformExceptionToFirebaseException(e, s);
  }
}