diff --git a/lib/pages/shop/home/shop_home_page.dart b/lib/pages/shop/home/shop_home_page.dart index 56f44f7..638b19e 100644 --- a/lib/pages/shop/home/shop_home_page.dart +++ b/lib/pages/shop/home/shop_home_page.dart @@ -68,8 +68,8 @@ class _ShopHomeView extends StatelessWidget { gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, childAspectRatio: 2, - mainAxisSpacing: 14.h, - crossAxisSpacing: 6.w, + mainAxisSpacing: 16.h, + crossAxisSpacing: 12.w, ), itemBuilder: (BuildContext context, int index) { final productEntity = bloc.productDatas[index]; diff --git a/lib/pages/shop/home/widgets/product_item.dart b/lib/pages/shop/home/widgets/product_item.dart index 17c1f29..6c92213 100644 --- a/lib/pages/shop/home/widgets/product_item.dart +++ b/lib/pages/shop/home/widgets/product_item.dart @@ -18,11 +18,10 @@ class ProductItem extends StatelessWidget { border: Border.all(width: 1.0, color: Colors.black)), padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 16.h), child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( width: 124.w, // 图片宽度 - height: 124.h, // 图片高度 + height: 124.w, // 图片高度 decoration: BoxDecoration( borderRadius: BorderRadius.circular(5), // 圆角为5 diff --git a/lib/pages/shopping/view.dart b/lib/pages/shopping/view.dart index 1ef973b..de81065 100644 --- a/lib/pages/shopping/view.dart +++ b/lib/pages/shopping/view.dart @@ -85,7 +85,7 @@ class _ShoppingView extends StatelessWidget { children: [ Container( width: 210.w, // 图片宽度 - height: 210.h, // 图片高度 + height: 210.w, // 图片高度 decoration: BoxDecoration( borderRadius: BorderRadius.circular(5.w), // 圆角为5