class BoardTokenDto { BoardTokenDto({ required this.expiresAt, required this.whiteboardAppid, required this.whiteboardUuid, required this.expiresIn, required this.whiteboardToken, }); DateTime expiresAt; String whiteboardAppid; String whiteboardUuid; int expiresIn; String whiteboardToken; factory BoardTokenDto.fromJson(Map json) => BoardTokenDto( expiresAt: DateTime.parse(json["expires_at"]), whiteboardAppid: json["whiteboard_appid"], whiteboardUuid: json["whiteboard_uuid"], expiresIn: json["expires_in"], whiteboardToken: json["whiteboard_token"], ); Map toJson() => { "expires_at": expiresAt.toIso8601String(), "whiteboard_appid": whiteboardAppid, "whiteboard_uuid": whiteboardUuid, "expires_in": expiresIn, "whiteboard_token": whiteboardToken, }; }