import 'package:json_annotation/json_annotation.dart'; import 'CompetitionSeason.dart'; part 'GameInfoSeasons.g.dart'; @JsonSerializable() class GameInfoSeasons { GameInfoSeasons(this.id, this.gameName, this.typeFlag,this.competitionSeason); int id; String gameName;//名称 int typeFlag;//类型 CompetitionSeason competitionSeason; factory GameInfoSeasons.fromJson(Map json) => _$GameInfoSeasonsFromJson(json); Map toJson() => _$GameInfoSeasonsToJson(this); // 命名构造函数 GameInfoSeasons.empty(); @override String toString() { return _$GameInfoSeasonsToJson(this).toString(); } }