/// RTC 频道创建返回数据 class RtcChannelData { final String channelId; final String token; final int uid; final bool success; final String code; RtcChannelData({ required this.channelId, required this.token, required this.uid, required this.success, required this.code, }); factory RtcChannelData.fromJson(Map json) { return RtcChannelData( channelId: json['channelId']?.toString() ?? '', token: json['token']?.toString() ?? '', uid: json['uid'] ?? 0, success: json['success'] as bool? ?? false, code: json['code']?.toString() ?? '', ); } Map toJson() { return { 'channelId': channelId, 'token': token, 'uid': uid, 'success': success, 'code': code, }; } @override String toString() => 'RtcChannelData(channelId: $channelId)'; }