| 123456789101112131415161718192021222324252627 |
- import 'package:json_annotation/json_annotation.dart';
- part 'user_info.g.dart';
- // 在生成键盘出使用
- @JsonSerializable()
- class UserInfo {
- @JsonKey(name: "name")
- String? name;
- @JsonKey(name: "birthday")
- String? birthday;
- @JsonKey(name: "gender")
- int? gender;
- UserInfo({
- this.name,
- this.birthday,
- this.gender,
- });
- Map<String, dynamic> toJson() => _$UserInfoToJson(this);
- factory UserInfo.fromJson(Map<String, dynamic> json) =>
- _$UserInfoFromJson(json);
- }
|