import 'package:huixiang/data/preferential.dart'; import 'package:json_annotation/json_annotation.dart'; part 'channels.g.dart'; @JsonSerializable(explicitToJson: true) class Channels { @JsonKey(name: "channels") List? channel = []; bool? isOpen = false; List? preferentialList = []; Channels(); factory Channels.fromJson(Map json) => _$ChannelsFromJson(json); Map toJson() => _$ChannelsToJson(this); }