28 lines
549 B
Dart
28 lines
549 B
Dart
import 'dart:convert';
|
|
|
|
|
|
/// 频道列表 response
|
|
class ChannelResponse {
|
|
String code;
|
|
String title;
|
|
|
|
ChannelResponse({
|
|
required this.code,
|
|
required this.title,
|
|
});
|
|
|
|
factory ChannelResponse.fromRawJson(String str) => ChannelResponse.fromJson(json.decode(str));
|
|
|
|
String toRawJson() => json.encode(toJson());
|
|
|
|
factory ChannelResponse.fromJson(Map<String, dynamic> json) => ChannelResponse(
|
|
code: json["code"],
|
|
title: json["title"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"code": code,
|
|
"title": title,
|
|
};
|
|
}
|