Commit 2101b1ccb02a8b86d29e760cde0f31dc87dc5591
1 parent
77d53ec4
feat:购买页ui优化
Showing
3 changed files
with
4 additions
and
5 deletions
lib/pages/shop/home/shop_home_page.dart
@@ -68,8 +68,8 @@ class _ShopHomeView extends StatelessWidget { | @@ -68,8 +68,8 @@ class _ShopHomeView extends StatelessWidget { | ||
68 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | 68 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
69 | crossAxisCount: 2, | 69 | crossAxisCount: 2, |
70 | childAspectRatio: 2, | 70 | childAspectRatio: 2, |
71 | - mainAxisSpacing: 14.h, | ||
72 | - crossAxisSpacing: 6.w, | 71 | + mainAxisSpacing: 16.h, |
72 | + crossAxisSpacing: 12.w, | ||
73 | ), | 73 | ), |
74 | itemBuilder: (BuildContext context, int index) { | 74 | itemBuilder: (BuildContext context, int index) { |
75 | final productEntity = bloc.productDatas[index]; | 75 | final productEntity = bloc.productDatas[index]; |
lib/pages/shop/home/widgets/product_item.dart
@@ -18,11 +18,10 @@ class ProductItem extends StatelessWidget { | @@ -18,11 +18,10 @@ class ProductItem extends StatelessWidget { | ||
18 | border: Border.all(width: 1.0, color: Colors.black)), | 18 | border: Border.all(width: 1.0, color: Colors.black)), |
19 | padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), | 19 | padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), |
20 | child: Row( | 20 | child: Row( |
21 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
22 | children: [ | 21 | children: [ |
23 | Container( | 22 | Container( |
24 | width: 124.w, // 图片宽度 | 23 | width: 124.w, // 图片宽度 |
25 | - height: 124.h, // 图片高度 | 24 | + height: 124.w, // 图片高度 |
26 | decoration: BoxDecoration( | 25 | decoration: BoxDecoration( |
27 | borderRadius: BorderRadius.circular(5), | 26 | borderRadius: BorderRadius.circular(5), |
28 | // 圆角为5 | 27 | // 圆角为5 |
lib/pages/shopping/view.dart
@@ -85,7 +85,7 @@ class _ShoppingView extends StatelessWidget { | @@ -85,7 +85,7 @@ class _ShoppingView extends StatelessWidget { | ||
85 | children: [ | 85 | children: [ |
86 | Container( | 86 | Container( |
87 | width: 210.w, // 图片宽度 | 87 | width: 210.w, // 图片宽度 |
88 | - height: 210.h, // 图片高度 | 88 | + height: 210.w, // 图片高度 |
89 | decoration: BoxDecoration( | 89 | decoration: BoxDecoration( |
90 | borderRadius: BorderRadius.circular(5.w), | 90 | borderRadius: BorderRadius.circular(5.w), |
91 | // 圆角为5 | 91 | // 圆角为5 |