import 'package:json_annotation/json_annotation.dart'; part 'update_bean.g.dart'; @JsonSerializable(explicitToJson: true) class UpdateBean { bool? needUpdate; bool? forceUpdate; String? latestVersion; String? downloadUrl; String? updateDescription; UpdateBean(this.needUpdate, this.forceUpdate, this.latestVersion, this.downloadUrl, this.updateDescription); factory UpdateBean.fromJson(Map json) => _$UpdateBeanFromJson(json); Map toJson() => _$UpdateBeanToJson(this); }