Commit 0963e27a0a2fe6cf363ed4d2895e0e88ae49cdc1

Authored by 吴启风
1 parent 99b94d6c

feat:图片字段修正

lib/generated/json/popup_entity.g.dart
... ... @@ -19,9 +19,9 @@ PopupEntity $PopupEntityFromJson(Map<String, dynamic> json) {
19 19 if (id != null) {
20 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 26 final int? status = jsonConvert.convert<int>(json['status']);
27 27 if (status != null) {
... ... @@ -36,7 +36,7 @@ Map&lt;String, dynamic&gt; $PopupEntityToJson(PopupEntity entity) {
36 36 data['actionValue'] = entity.actionValue;
37 37 data['dayNum'] = entity.dayNum;
38 38 data['id'] = entity.id;
39   - data['imageId'] = entity.imageId;
  39 + data['imageUrl'] = entity.imageUrl;
40 40 data['status'] = entity.status;
41 41 return data;
42 42 }
... ... @@ -47,7 +47,7 @@ extension PopupEntityExtension on PopupEntity {
47 47 String? actionValue,
48 48 int? dayNum,
49 49 String? id,
50   - String? imageId,
  50 + String? imageUrl,
51 51 int? status,
52 52 }) {
53 53 return PopupEntity()
... ... @@ -55,7 +55,7 @@ extension PopupEntityExtension on PopupEntity {
55 55 ..actionValue = actionValue ?? this.actionValue
56 56 ..dayNum = dayNum ?? this.dayNum
57 57 ..id = id ?? this.id
58   - ..imageId = imageId ?? this.imageId
  58 + ..imageUrl = imageUrl ?? this.imageUrl
59 59 ..status = status ?? this.status;
60 60 }
61 61 }
62 62 \ No newline at end of file
... ...
lib/models/popup_entity.dart
... ... @@ -8,7 +8,7 @@ class PopupEntity {
8 8 late String actionValue;
9 9 late int dayNum;
10 10 late String id;
11   - late String imageId;
  11 + late String imageUrl;
12 12 late int status;
13 13  
14 14 PopupEntity();
... ...
lib/pages/home/view.dart
... ... @@ -323,7 +323,7 @@ class _HomePageView extends StatelessWidget {
323 323  
324 324 ///popup对话框
325 325 void _showPopupDialog(BuildContext context, PopupEntity popupEntity) {
326   - if (popupEntity.imageId.isEmpty) {
  326 + if (popupEntity.imageUrl.isEmpty) {
327 327 return;
328 328 }
329 329 showDialog(
... ... @@ -349,7 +349,7 @@ class _HomePageView extends StatelessWidget {
349 349 },
350 350 child: OwImageWidget(
351 351 height: MediaQuery.of(context).size.height * 0.8,
352   - name: popupEntity.imageId,
  352 + name: popupEntity.imageUrl,
353 353 fit: BoxFit.fitHeight),
354 354 ),
355 355 ),
... ... @@ -357,7 +357,12 @@ class _HomePageView extends StatelessWidget {
357 357 top: 0,
358 358 right: 0,
359 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 366 onPressed: () {
362 367 Navigator.of(context).pop();
363 368 },
... ...