更新样式
This commit is contained in:
@@ -62,10 +62,10 @@ class _ReservationListBottomSheetState extends State<ReservationListBottomSheet>
|
||||
return SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Row( children: _statusOptions.entries.map((entry) {
|
||||
child: Row(
|
||||
children: _statusOptions.entries.map((entry) {
|
||||
bool isSelected = _selectedStatus == entry.key;
|
||||
return GestureDetector(
|
||||
// 关键点:增加 HitTestBehavior.opaque 扩大点击有效范围
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
if (_selectedStatus == entry.key) return;
|
||||
@@ -84,7 +84,7 @@ class _ReservationListBottomSheetState extends State<ReservationListBottomSheet>
|
||||
decoration: BoxDecoration(
|
||||
// 选中色使用深绿色,未选中保持纯白
|
||||
color: isSelected ? const Color(0xFF006633) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(25), // 圆角稍微调大一点更像胶囊
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.04),
|
||||
|
||||
Reference in New Issue
Block a user