import 'package:json_annotation/json_annotation.dart'; part 'version_info.g.dart'; ///版本信息 @JsonSerializable() class VersionInfo { @JsonKey(name: "downloadUrl") final String? downloadUrl; @JsonKey(name: "version") final String? version; @JsonKey(name: "content") final String? content; @JsonKey(name: "mandatoryUpdate") final String? mandatoryUpdate; @JsonKey(name: "code") final String? code; VersionInfo({ this.downloadUrl, this.version, this.content, this.mandatoryUpdate, this.code }); factory VersionInfo.fromJson(Map json) { return _$VersionInfoFromJson(json); } Map toJson() { return _$VersionInfoToJson(this); } }