setCustomCrashSegment static method
- @Deprecated('Use setCustomCrashSegment of CountlyConfig instead')
Set optional key/value segment added for crash reports. Should be call before Countly init
Implementation
@Deprecated('Use setCustomCrashSegment of CountlyConfig instead')
static Future<String?> setCustomCrashSegment(Map<String, Object> segments) async {
int segCount = segments.length;
log('Calling "setCustomCrashSegment" segmentation count:[$segCount]');
log('setCustomCrashSegment is deprecated, use setCustomCrashSegment of CountlyConfig instead', logLevel: LogLevel.WARNING);
List<String> args = [];
segments.forEach((k, v) {
args.add(k.toString());
args.add(v.toString());
});
final String? result = await _channel.invokeMethod('setCustomCrashSegment', <String, dynamic>{'data': json.encode(args)});
return result;
}