29 lines
671 B
Dart
29 lines
671 B
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'app_info_model.freezed.dart';
|
|
part 'app_info_model.g.dart';
|
|
|
|
@freezed
|
|
abstract class AppInfoModel with _$AppInfoModel {
|
|
const factory AppInfoModel({
|
|
required String key,
|
|
required Info info,
|
|
required String downloadLink,
|
|
}) = _AppInfoModel;
|
|
|
|
factory AppInfoModel.fromJson(Map<String, dynamic> json) =>
|
|
_$AppInfoModelFromJson(json);
|
|
}
|
|
|
|
@freezed
|
|
abstract class Info with _$Info {
|
|
const factory Info({
|
|
required String version,
|
|
required bool required,
|
|
required String module,
|
|
}) = _Info;
|
|
|
|
factory Info.fromJson(Map<String, dynamic> json) => _$InfoFromJson(json);
|
|
}
|
|
|