李志伟 пре 2 година
родитељ
комит
dba8124760

+ 3
- 7
lib/pages/machinery/detail/widgets/detail.dart Прегледај датотеку

@@ -5,8 +5,6 @@ import 'package:flutter/widgets.dart';
5 5
 import 'package:flutter/material.dart';
6 6
 import 'package:flutter_screenutil/flutter_screenutil.dart';
7 7
 import 'package:farmer_client/widgets/ExtendContentList.dart';
8
-import 'package:farmer_client/models/entities/ExtendContent.dart';
9
-import 'package:get/get.dart';
10 8
 import '../../../../models/entities/CardInfo.dart';
11 9
 import '../../widgets/summary.dart';
12 10
 
@@ -20,11 +18,9 @@ Widget page(
20 18
   return DefLayout(
21 19
       head: CarouselSlider(
22 20
         items: bnnerItem
23
-            .map((item) => Container(
24
-                  child: Center(
25
-                      child: Image.network(item.url.toString(),
26
-                          fit: BoxFit.fitWidth, width: 370.w)),
27
-                ))
21
+            .map((item) => Center(
22
+                child: Image.network(item.url.toString(),
23
+                    fit: BoxFit.fitWidth, width: 370.w)))
28 24
             .toList(),
29 25
         options: CarouselOptions(
30 26
           autoPlay: true,

+ 0
- 6
lib/widgets/CarsCard.dart Прегледај датотеку

@@ -1,14 +1,8 @@
1
-import 'package:flutter/foundation.dart';
2 1
 import 'package:flutter/material.dart';
3 2
 import 'package:flutter_screenutil/flutter_screenutil.dart';
4 3
 import 'package:get/get.dart';
5
-import 'package:get/get_core/src/get_main.dart';
6
-
7
-import '../models/entities/CardInfo.dart';
8 4
 import '../models/entities/CardListModel.dart';
9
-import '../pages/OrderConfirmation/index.dart';
10 5
 import '../pages/machinery/detail/index.dart';
11
-import '../pages/machinery/map/index.dart';
12 6
 import 'LinearGradientText.dart';
13 7
 
14 8
 class CarsCard extends StatefulWidget {

+ 14
- 35
lib/widgets/ExtendContentList.dart Прегледај датотеку

@@ -1,10 +1,6 @@
1 1
 import 'package:flutter/widgets.dart';
2 2
 import 'package:flutter_screenutil/flutter_screenutil.dart';
3
-import 'package:get/get_rx/src/rx_types/rx_types.dart';
4
-import 'package:get/get_state_manager/src/rx_flutter/rx_obx_widget.dart';
5
-
6 3
 import '../models/entities/CardInfo.dart';
7
-import '../models/entities/ExtendContent.dart';
8 4
 
9 5
 class ExtendContentList extends StatelessWidget {
10 6
   final List<ContentImageList> item;
@@ -23,37 +19,20 @@ class ExtendContentList extends StatelessWidget {
23 19
 
24 20
   @override
25 21
   Widget build(BuildContext context) {
26
-    //
27
-    // List<Widget> _widgets = [];
28
-    // Container(
29
-    //   child: item.contentType == "image" ? _image(item.content) : _text(item.content),
30
-    // );
31
-    // for (var i = 0; i < item.length; i += 1) {
32
-    //   if (i != 0 ) {
33
-    //     _widgets.add(SizedBox(height: 20.w,));
34
-    //   }
35
-    //   var item = item[i];
36
-    //   _widgets.add(Container(
37
-    //     child: item.contentType == "image" ? _image(item.content) : _text(item.content),
38
-    //   ));
39
-    // }
40
-
41
-    return Container(
42
-      child: Column(
43
-        children: item.map((item) {
44
-          if (item.contentType != 'image') {
45
-            return Container(
46
-                padding: EdgeInsets.fromLTRB(0, 20, 0, 10),
47
-                width: 344.w,
48
-                child: _text(item.content));
49
-          } else {
50
-            return Container(
51
-              padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
52
-              child: _image(item.content),
53
-            );
54
-          }
55
-        }).toList(),
56
-      ),
22
+    return Column(
23
+      children: item.map((item) {
24
+        if (item.contentType != 'image') {
25
+          return Container(
26
+              padding: EdgeInsets.fromLTRB(0, 20, 0, 10),
27
+              width: 344.w,
28
+              child: _text(item.content));
29
+        } else {
30
+          return Container(
31
+            padding: EdgeInsets.fromLTRB(0, 10, 0, 10),
32
+            child: _image(item.content),
33
+          );
34
+        }
35
+      }).toList(),
57 36
     );
58 37
   }
59 38
 }