addCrashLog static method
Implementation
static Future<String?> addCrashLog(String logs) async {
if (!_instance._countlyState.isInitialized) {
String message = '"initWithConfig" must be called before "addCrashLog"';
log('addCrashLog, $message', logLevel: LogLevel.ERROR);
return message;
}
log('Calling "addCrashLog":[$logs]');
if (logs.isEmpty) {
String error = "addCrashLog, Can't add a null or empty crash logs";
log(error);
return 'Error : $error';
}
List<String> args = [];
args.add(logs);
final String? result = await _channel.invokeMethod('addCrashLog', <String, dynamic>{'data': json.encode(args)});
return result;
}