You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
573 B
30 lines
573 B
4 years ago
|
/// name : "百花谷"
|
||
|
/// avatar : "https://pos.upload.gznl.top/MDAwMA==/2021/06/6a3586dc-a340-470f-b645-1e3155d5f558.jpg"
|
||
|
|
||
|
class Author {
|
||
|
String _name;
|
||
|
String _avatar;
|
||
|
|
||
|
String get name => _name;
|
||
|
String get avatar => _avatar;
|
||
|
|
||
|
Author({
|
||
|
String name,
|
||
|
String avatar}){
|
||
|
_name = name;
|
||
|
_avatar = avatar;
|
||
|
}
|
||
|
|
||
|
Author.fromJson(dynamic json) {
|
||
|
_name = json["name"];
|
||
|
_avatar = json["avatar"];
|
||
|
}
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
var map = <String, dynamic>{};
|
||
|
map["name"] = _name;
|
||
|
map["avatar"] = _avatar;
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
}
|