From 0963e27a0a2fe6cf363ed4d2895e0e88ae49cdc1 Mon Sep 17 00:00:00 2001 From: wuqifeng <540416539@qq.com> Date: Sun, 27 Oct 2024 21:32:41 +0800 Subject: [PATCH] feat:图片字段修正 --- lib/generated/json/popup_entity.g.dart | 12 ++++++------ lib/models/popup_entity.dart | 2 +- lib/pages/home/view.dart | 11 ++++++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/generated/json/popup_entity.g.dart b/lib/generated/json/popup_entity.g.dart index 7856324..c22aa1c 100644 --- a/lib/generated/json/popup_entity.g.dart +++ b/lib/generated/json/popup_entity.g.dart @@ -19,9 +19,9 @@ PopupEntity $PopupEntityFromJson(Map json) { if (id != null) { popupEntity.id = id; } - final String? imageId = jsonConvert.convert(json['imageId']); - if (imageId != null) { - popupEntity.imageId = imageId; + final String? imageUrl = jsonConvert.convert(json['imageUrl']); + if (imageUrl != null) { + popupEntity.imageUrl = imageUrl; } final int? status = jsonConvert.convert(json['status']); if (status != null) { @@ -36,7 +36,7 @@ Map $PopupEntityToJson(PopupEntity entity) { data['actionValue'] = entity.actionValue; data['dayNum'] = entity.dayNum; data['id'] = entity.id; - data['imageId'] = entity.imageId; + data['imageUrl'] = entity.imageUrl; data['status'] = entity.status; return data; } @@ -47,7 +47,7 @@ extension PopupEntityExtension on PopupEntity { String? actionValue, int? dayNum, String? id, - String? imageId, + String? imageUrl, int? status, }) { return PopupEntity() @@ -55,7 +55,7 @@ extension PopupEntityExtension on PopupEntity { ..actionValue = actionValue ?? this.actionValue ..dayNum = dayNum ?? this.dayNum ..id = id ?? this.id - ..imageId = imageId ?? this.imageId + ..imageUrl = imageUrl ?? this.imageUrl ..status = status ?? this.status; } } \ No newline at end of file diff --git a/lib/models/popup_entity.dart b/lib/models/popup_entity.dart index 4363048..6eb690b 100644 --- a/lib/models/popup_entity.dart +++ b/lib/models/popup_entity.dart @@ -8,7 +8,7 @@ class PopupEntity { late String actionValue; late int dayNum; late String id; - late String imageId; + late String imageUrl; late int status; PopupEntity(); diff --git a/lib/pages/home/view.dart b/lib/pages/home/view.dart index 1cb6ce6..8dd6ae3 100644 --- a/lib/pages/home/view.dart +++ b/lib/pages/home/view.dart @@ -323,7 +323,7 @@ class _HomePageView extends StatelessWidget { ///popup对话框 void _showPopupDialog(BuildContext context, PopupEntity popupEntity) { - if (popupEntity.imageId.isEmpty) { + if (popupEntity.imageUrl.isEmpty) { return; } showDialog( @@ -349,7 +349,7 @@ class _HomePageView extends StatelessWidget { }, child: OwImageWidget( height: MediaQuery.of(context).size.height * 0.8, - name: popupEntity.imageId, + name: popupEntity.imageUrl, fit: BoxFit.fitHeight), ), ), @@ -357,7 +357,12 @@ class _HomePageView extends StatelessWidget { top: 0, right: 0, child: IconButton( - icon: const Icon(Icons.close, color: Colors.white, opticalSize: 2), + icon: const Icon( + Icons.close, + color: Colors.white, + opticalSize: 2, + shadows: [Shadow(color: Colors.black, blurRadius: 24)], + ), onPressed: () { Navigator.of(context).pop(); }, -- libgit2 0.22.2