张延森 3 年前
父节点
当前提交
5b0ad209b3
共有 1 个文件被更改,包括 11 次插入21 次删除
  1. 11
    21
      lib/pages/machinery/detail/widgets/detail.dart

+ 11
- 21
lib/pages/machinery/detail/widgets/detail.dart 查看文件

9
 import '../../widgets/summary.dart';
9
 import '../../widgets/summary.dart';
10
 
10
 
11
 Widget page({ required BuildContext context, VoidCallback? handleClick}) {
11
 Widget page({ required BuildContext context, VoidCallback? handleClick}) {
12
-  final _offset = 20.w;
13
-  final width = MediaQuery.of(context).size.width;
14
-  final _bannerHeight = 250.w;
15
   final img = 'https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon19.jpg';
12
   final img = 'https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon19.jpg';
16
 
13
 
17
   final list = <ExtendContent>[
14
   final list = <ExtendContent>[
28
       head: Image.network(img, fit: BoxFit.cover),
25
       head: Image.network(img, fit: BoxFit.cover),
29
       children: [
26
       children: [
30
         DefLayout.card(
27
         DefLayout.card(
31
-            top: DefLayout.headHeight - DefLayout.offset,
32
-            child: _content(context, list, handleClick),
28
+          top: DefLayout.headHeight - DefLayout.offset,
29
+          padding: EdgeInsets.only(top: 45.w, left: 15.w, right: 15.w, bottom: 20.w),
30
+          child: _content(context, list, handleClick),
33
         )
31
         )
34
       ]
32
       ]
35
   );
33
   );
36
 }
34
 }
37
 
35
 
38
 Widget _content(BuildContext context, List<ExtendContent> list, VoidCallback? handleClick) {
36
 Widget _content(BuildContext context, List<ExtendContent> list, VoidCallback? handleClick) {
39
-  final _border = 20.w;
40
-  return Container(
41
-    padding: EdgeInsets.only(top: 40.w, left: 15.w, right: 15.w, bottom: 20.w),
42
-    decoration: BoxDecoration(
43
-      color: Colors.white,
44
-        borderRadius: BorderRadius.vertical(top: Radius.circular(_border))
45
-    ),
46
-    child: Column(
47
-      children: [
48
-        summary(),
49
-        _sectionHead('农机详情'),
50
-        ExtendContentList(list: list),
51
-        SizedBox(height: 20.w,),
52
-        RoundButton(text: "预约", onPressed: handleClick,)
53
-      ],
54
-    ),
37
+  return Column(
38
+    children: [
39
+      summary(),
40
+      _sectionHead('农机详情'),
41
+      ExtendContentList(list: list),
42
+      SizedBox(height: 20.w,),
43
+      RoundButton(text: "预约", onPressed: handleClick,)
44
+    ],
55
   );
45
   );
56
 }
46
 }
57
 
47