| 12345678910111213141516171819202122 |
- import 'package:json_annotation/json_annotation.dart';
- part 'option_select_item.g.dart';
- /// 选项选择实体类
- @JsonSerializable()
- class OptionSelectItem {
- // 名称
- @JsonKey(name: 'name')
- String name;
- // 是否选中
- @JsonKey(name: 'selected')
- bool selected;
- OptionSelectItem(this.name, {this.selected = false});
- factory OptionSelectItem.fromJson(Map<String, dynamic> json) =>
- _$OptionSelectItemFromJson(json);
- Map<String, dynamic> toJson() => _$OptionSelectItemToJson(this);
- }
|