import 'package:electronic_assistant/data/bean/agenda.dart'; import 'package:get/get.dart'; import 'package:json_annotation/json_annotation.dart'; part 'agenda_list_all_bean.g.dart'; @JsonSerializable() class AgendaListAllBean { @JsonKey(name: 'name') String? name; @JsonKey(name: 'agendas') List? list; final isExpanded = false.obs; AgendaListAllBean({this.name, this.list}); factory AgendaListAllBean.fromJson(Map json) => _$AgendaListAllBeanFromJson(json); factory AgendaListAllBean.from(AgendaListAllBean original) { return AgendaListAllBean( name: original.name, list: original.list?.map((agenda) => agenda).toList(), ); } }