collect method
收集行为数据
Implementation
Future<Map<String, dynamic>> collect({String? blackbox}) async {
if (_behaviorCollector == null) {
throw StateError('Behavior collector is not provided. Pass a BehaviorCollector to the constructor.');
}
final result = await _behaviorCollector!.collect();
if (result == null) {
return {'code': -1, 'msg': 'Data collection returned null'};
}
return result;
}