Commit 0963e27a0a2fe6cf363ed4d2895e0e88ae49cdc1
1 parent
99b94d6c
feat:图片字段修正
Showing
3 changed files
with
15 additions
and
10 deletions
lib/generated/json/popup_entity.g.dart
@@ -19,9 +19,9 @@ PopupEntity $PopupEntityFromJson(Map<String, dynamic> json) { | @@ -19,9 +19,9 @@ PopupEntity $PopupEntityFromJson(Map<String, dynamic> json) { | ||
19 | if (id != null) { | 19 | if (id != null) { |
20 | popupEntity.id = id; | 20 | popupEntity.id = id; |
21 | } | 21 | } |
22 | - final String? imageId = jsonConvert.convert<String>(json['imageId']); | ||
23 | - if (imageId != null) { | ||
24 | - popupEntity.imageId = imageId; | 22 | + final String? imageUrl = jsonConvert.convert<String>(json['imageUrl']); |
23 | + if (imageUrl != null) { | ||
24 | + popupEntity.imageUrl = imageUrl; | ||
25 | } | 25 | } |
26 | final int? status = jsonConvert.convert<int>(json['status']); | 26 | final int? status = jsonConvert.convert<int>(json['status']); |
27 | if (status != null) { | 27 | if (status != null) { |
@@ -36,7 +36,7 @@ Map<String, dynamic> $PopupEntityToJson(PopupEntity entity) { | @@ -36,7 +36,7 @@ Map<String, dynamic> $PopupEntityToJson(PopupEntity entity) { | ||
36 | data['actionValue'] = entity.actionValue; | 36 | data['actionValue'] = entity.actionValue; |
37 | data['dayNum'] = entity.dayNum; | 37 | data['dayNum'] = entity.dayNum; |
38 | data['id'] = entity.id; | 38 | data['id'] = entity.id; |
39 | - data['imageId'] = entity.imageId; | 39 | + data['imageUrl'] = entity.imageUrl; |
40 | data['status'] = entity.status; | 40 | data['status'] = entity.status; |
41 | return data; | 41 | return data; |
42 | } | 42 | } |
@@ -47,7 +47,7 @@ extension PopupEntityExtension on PopupEntity { | @@ -47,7 +47,7 @@ extension PopupEntityExtension on PopupEntity { | ||
47 | String? actionValue, | 47 | String? actionValue, |
48 | int? dayNum, | 48 | int? dayNum, |
49 | String? id, | 49 | String? id, |
50 | - String? imageId, | 50 | + String? imageUrl, |
51 | int? status, | 51 | int? status, |
52 | }) { | 52 | }) { |
53 | return PopupEntity() | 53 | return PopupEntity() |
@@ -55,7 +55,7 @@ extension PopupEntityExtension on PopupEntity { | @@ -55,7 +55,7 @@ extension PopupEntityExtension on PopupEntity { | ||
55 | ..actionValue = actionValue ?? this.actionValue | 55 | ..actionValue = actionValue ?? this.actionValue |
56 | ..dayNum = dayNum ?? this.dayNum | 56 | ..dayNum = dayNum ?? this.dayNum |
57 | ..id = id ?? this.id | 57 | ..id = id ?? this.id |
58 | - ..imageId = imageId ?? this.imageId | 58 | + ..imageUrl = imageUrl ?? this.imageUrl |
59 | ..status = status ?? this.status; | 59 | ..status = status ?? this.status; |
60 | } | 60 | } |
61 | } | 61 | } |
62 | \ No newline at end of file | 62 | \ No newline at end of file |
lib/models/popup_entity.dart
@@ -8,7 +8,7 @@ class PopupEntity { | @@ -8,7 +8,7 @@ class PopupEntity { | ||
8 | late String actionValue; | 8 | late String actionValue; |
9 | late int dayNum; | 9 | late int dayNum; |
10 | late String id; | 10 | late String id; |
11 | - late String imageId; | 11 | + late String imageUrl; |
12 | late int status; | 12 | late int status; |
13 | 13 | ||
14 | PopupEntity(); | 14 | PopupEntity(); |
lib/pages/home/view.dart
@@ -323,7 +323,7 @@ class _HomePageView extends StatelessWidget { | @@ -323,7 +323,7 @@ class _HomePageView extends StatelessWidget { | ||
323 | 323 | ||
324 | ///popup对话框 | 324 | ///popup对话框 |
325 | void _showPopupDialog(BuildContext context, PopupEntity popupEntity) { | 325 | void _showPopupDialog(BuildContext context, PopupEntity popupEntity) { |
326 | - if (popupEntity.imageId.isEmpty) { | 326 | + if (popupEntity.imageUrl.isEmpty) { |
327 | return; | 327 | return; |
328 | } | 328 | } |
329 | showDialog( | 329 | showDialog( |
@@ -349,7 +349,7 @@ class _HomePageView extends StatelessWidget { | @@ -349,7 +349,7 @@ class _HomePageView extends StatelessWidget { | ||
349 | }, | 349 | }, |
350 | child: OwImageWidget( | 350 | child: OwImageWidget( |
351 | height: MediaQuery.of(context).size.height * 0.8, | 351 | height: MediaQuery.of(context).size.height * 0.8, |
352 | - name: popupEntity.imageId, | 352 | + name: popupEntity.imageUrl, |
353 | fit: BoxFit.fitHeight), | 353 | fit: BoxFit.fitHeight), |
354 | ), | 354 | ), |
355 | ), | 355 | ), |
@@ -357,7 +357,12 @@ class _HomePageView extends StatelessWidget { | @@ -357,7 +357,12 @@ class _HomePageView extends StatelessWidget { | ||
357 | top: 0, | 357 | top: 0, |
358 | right: 0, | 358 | right: 0, |
359 | child: IconButton( | 359 | child: IconButton( |
360 | - icon: const Icon(Icons.close, color: Colors.white, opticalSize: 2), | 360 | + icon: const Icon( |
361 | + Icons.close, | ||
362 | + color: Colors.white, | ||
363 | + opticalSize: 2, | ||
364 | + shadows: [Shadow(color: Colors.black, blurRadius: 24)], | ||
365 | + ), | ||
361 | onPressed: () { | 366 | onPressed: () { |
362 | Navigator.of(context).pop(); | 367 | Navigator.of(context).pop(); |
363 | }, | 368 | }, |