version_info.dart 729 B

1234567891011121314151617181920212223242526272829303132333435
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'version_info.g.dart';
  3. ///版本信息
  4. @JsonSerializable()
  5. class VersionInfo {
  6. @JsonKey(name: "downloadUrl")
  7. final String? downloadUrl;
  8. @JsonKey(name: "version")
  9. final String? version;
  10. @JsonKey(name: "content")
  11. final String? content;
  12. @JsonKey(name: "mandatoryUpdate")
  13. final String? mandatoryUpdate;
  14. @JsonKey(name: "code")
  15. final String? code;
  16. VersionInfo({
  17. this.downloadUrl,
  18. this.version,
  19. this.content,
  20. this.mandatoryUpdate,
  21. this.code
  22. });
  23. factory VersionInfo.fromJson(Map<String, dynamic> json) {
  24. return _$VersionInfoFromJson(json);
  25. }
  26. Map<String, dynamic> toJson() {
  27. return _$VersionInfoToJson(this);
  28. }
  29. }