class RtcTokenDto { RtcTokenDto({ required this.uid, required this.expiresAt, required this.channel, required this.token, }); String uid; DateTime expiresAt; String channel; String token; factory RtcTokenDto.fromJson(Map json) => RtcTokenDto( uid: json["uid"], expiresAt: DateTime.parse(json["expires_at"]), channel: json["channel"], token: json["token"], ); Map toJson() => { "uid": uid, "expires_at": expiresAt.toIso8601String(), "channel": channel, "token": token, }; }