import 'package:json_annotation/json_annotation.dart'; part 'set_meal_data.g.dart'; @JsonSerializable(explicitToJson: true) class SetMealData { String? groupName = ''; List? productInfoList = []; SetMealData(); factory SetMealData.fromJson(Map json) => _$SetMealDataFromJson(json); Map toJson() => _$SetMealDataToJson(this); } @JsonSerializable(explicitToJson: true) class ProductInfoList { String? skuId = ''; String? skuName = ''; int? buyNumber = 0; String? productId = ''; dynamic sellPrice; String? productName = ''; ProductInfoList(); factory ProductInfoList.fromJson(Map json) => _$ProductInfoListFromJson(json); Map toJson() => _$ProductInfoListToJson(this); }