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.
21 lines
487 B
21 lines
487 B
10 months ago
|
import 'package:huixiang/generated/json/base/json_field.dart';
|
||
|
import 'package:huixiang/generated/json/author.g.dart';
|
||
|
import 'dart:convert';
|
||
|
export 'package:huixiang/generated/json/author.g.dart';
|
||
|
|
||
|
@JsonSerializable()
|
||
|
class Author {
|
||
|
String? name = '';
|
||
|
String? avatar = '';
|
||
|
|
||
|
Author();
|
||
|
|
||
|
factory Author.fromJson(Map<String, dynamic> json) => $AuthorFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => $AuthorToJson(this);
|
||
|
|
||
|
@override
|
||
|
String toString() {
|
||
|
return jsonEncode(this);
|
||
|
}
|
||
|
}
|