Files
tuiche/lib/component/img/img_preview_controller.dart
2025-06-03 09:34:31 +08:00

24 lines
554 B
Dart

import 'package:ef/ef.dart';
import 'package:json_annotation/json_annotation.dart';
part 'img_preview_controller.g.dart';
@JsonSerializable()
class ImgPreviewModel {
//版本id
String? url; //图片地址
ImgPreviewModel();
static ImgPreviewModel fromJson(Map<String, dynamic> json) =>
_$ImgPreviewModelFromJson(json);
Map<String, dynamic> toJson() => _$ImgPreviewModelToJson(this);
}
class ImgPreviewController extends GetControllerEx<ImgPreviewModel> {
ImgPreviewController() {
attr = GetModel(ImgPreviewModel()).obs;
}
}