initialize static method

Future<void> initialize({
  1. CrashListener? onCrash,
})

Implementation

static Future<void> initialize({CrashListener? onCrash}) async {
  _crashListener = onCrash;

  PlatformDispatcher.instance.onError = (Object error, StackTrace stack) {
    _recordError(error, stack);
    return true;
  };

  FlutterError.onError = _recordFlutterError;
}