import 'package:json_annotation/json_annotation.dart'; part 'second_card.g.dart'; @JsonSerializable(explicitToJson: true) class SecondCard { String? id = ''; String? phone = ''; String? nickname = ''; String? headimg = ''; bool? isAdd = false; SecondCard(); factory SecondCard.fromJson(Map json) => _$SecondCardFromJson(json); Map toJson() => _$SecondCardToJson(this); }