enableCrashReporting static method
- @Deprecated('This function is deprecated, please use "enableCrashReporting" of CountlyConfig instead')
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;
}