CrashLogger constructor

CrashLogger()

Implementation

CrashLogger() {
  FlutterError.onError = (FlutterErrorDetails details) async {
    FlutterError.presentError(details);
    await _captureAndSaveCrashLog(details);
  };
  Isolate.current.addErrorListener(RawReceivePort((dynamic pair) async {
    final List<dynamic> errorAndStacktrace = pair;
    await _captureAndSaveCrashLog(
        errorAndStacktrace[0], errorAndStacktrace[1]);
  }).sendPort);
}