Commit 9f8e9424a833a1cd31346918bc68c6938324943f

Authored by 吴启风
1 parent 1663d66f

fix: 扩大商城购买按钮点击区域

lib/pages/shop/home/shop_home_page.dart
@@ -5,7 +5,6 @@ import 'package:wow_english/common/extension/string_extension.dart'; @@ -5,7 +5,6 @@ import 'package:wow_english/common/extension/string_extension.dart';
5 import 'package:wow_english/common/widgets/we_app_bar.dart'; 5 import 'package:wow_english/common/widgets/we_app_bar.dart';
6 import 'package:wow_english/pages/shop/home/widgets/product_item.dart'; 6 import 'package:wow_english/pages/shop/home/widgets/product_item.dart';
7 import 'package:wow_english/route/route.dart'; 7 import 'package:wow_english/route/route.dart';
8 -import 'package:wow_english/utils/toast_util.dart';  
9 8
10 import 'bloc/shop_home_bloc.dart'; 9 import 'bloc/shop_home_bloc.dart';
11 10
lib/pages/shop/home/widgets/product_item.dart
@@ -67,10 +67,13 @@ class ProductItem extends StatelessWidget { @@ -67,10 +67,13 @@ class ProductItem extends StatelessWidget {
67 ), 67 ),
68 ), 68 ),
69 GestureDetector( 69 GestureDetector(
  70 + behavior: HitTestBehavior.opaque,
70 onTap: () { 71 onTap: () {
71 onTap(); 72 onTap();
72 }, 73 },
73 child: Container( 74 child: Container(
  75 + width: double.infinity,
  76 + constraints: BoxConstraints(minHeight: 28.h),
74 decoration: BoxDecoration( 77 decoration: BoxDecoration(
75 color: const Color(0xFFF5C51F), 78 color: const Color(0xFFF5C51F),
76 borderRadius: BorderRadius.circular(5.r), 79 borderRadius: BorderRadius.circular(5.r),
@@ -78,17 +81,14 @@ class ProductItem extends StatelessWidget { @@ -78,17 +81,14 @@ class ProductItem extends StatelessWidget {
78 color: const Color(0xFF333333), 81 color: const Color(0xFF333333),
79 width: 1.0, 82 width: 1.0,
80 )), 83 )),
81 - padding: EdgeInsets.symmetric(  
82 - vertical: 1.h  
83 - ), 84 + padding: EdgeInsets.symmetric(vertical: 4.h),
84 child: Center( 85 child: Center(
85 child: Text( 86 child: Text(
86 '立即购买', 87 '立即购买',
87 style: TextStyle( 88 style: TextStyle(
88 fontSize: 10.sp, color: const Color(0xFF333333)), 89 fontSize: 10.sp, color: const Color(0xFF333333)),
89 ), 90 ),
90 - )  
91 - ), 91 + )),
92 ) 92 )
93 ], 93 ],
94 ), 94 ),