import 'package:json_annotation/json_annotation.dart'; part 'character_info.g.dart'; @JsonSerializable() class CharacterInfo { //人设id @JsonKey(name: 'id') String? id; //人设名称 @JsonKey(name: 'name') String? name; //头像 @JsonKey(name: 'imageUrl') String? imageUrl; // 人设描述 @JsonKey(name: 'description') String? description; // 人设表情 @JsonKey(name: 'emoji') String? emoji; @JsonKey(name: 'isVip') bool? isVip; @JsonKey(name: 'isLock') bool? isLock; @JsonKey(name: 'isAdd') bool? isAdd; CharacterInfo({ this.id, this.name, this.imageUrl, this.description, this.emoji, this.isVip, this.isLock, this.isAdd, }); factory CharacterInfo.fromJson(Map json) => _$CharacterInfoFromJson(json); Map toJson() => _$CharacterInfoToJson(this); }