enableCrashReporting static method

  1. @Deprecated('This function is deprecated, please use "enableCrashReporting" of CountlyConfig instead')
Future<String?> enableCrashReporting()

Enable crash reporting to report uncaught errors to Countly. Should be call before Countly init returns error or success message

Implementation

@Deprecated('This function is deprecated, please use "enableCrashReporting" of CountlyConfig instead')
static Future<String?> enableCrashReporting() async {
  log('Calling "enableCrashReporting"');
  log('enableCrashReporting is deprecated, use enableCrashReporting of CountlyConfig instead', logLevel: LogLevel.WARNING);
  FlutterError.onError = _recordFlutterError;
  PlatformDispatcher.instance.onError = (e, s) {
    _internalRecordError(e, s);
    return true;
  };
  _enableCrashReportingFlag = true;
  final String? result = await _channel.invokeMethod('enableCrashReporting');

  return result;
}