优化 打点删除撤回的点击效果
This commit is contained in:
@@ -165,11 +165,20 @@ class _BottomOperationPanelState extends State<BottomOperationPanel> {
|
||||
|
||||
widget.onAddTap?.call();
|
||||
},
|
||||
child: Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: const BoxDecoration(color: Color(0xFF00C853), shape: BoxShape.circle),
|
||||
child: const Icon(Icons.add, color: Colors.white, size: 32),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
shape: const CircleBorder(),
|
||||
child: InkWell(
|
||||
customBorder: const CircleBorder(),
|
||||
splashColor: Colors.white24,
|
||||
highlightColor: Colors.white10,
|
||||
child: Ink(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: const BoxDecoration(color: Color(0xFF00C853), shape: BoxShape.circle),
|
||||
child: const Icon(Icons.add, color: Colors.white, size: 32),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.initialWorkMode == WorkMode.bow)
|
||||
@@ -297,20 +306,27 @@ class _BottomOperationPanelState extends State<BottomOperationPanel> {
|
||||
|
||||
// 构建操作按钮
|
||||
Widget _buildActionButton(IconData icon, String label, bool isEnabled, VoidCallback onTap) {
|
||||
return GestureDetector(
|
||||
onTap: isEnabled ? onTap : null,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(color: isEnabled ? Colors.blue : Colors.grey[300], shape: BoxShape.circle),
|
||||
child: Icon(icon, color: Colors.white),
|
||||
return Column(
|
||||
children: [
|
||||
Material(
|
||||
color: Colors.transparent,
|
||||
shape: const CircleBorder(),
|
||||
child: InkWell(
|
||||
onTap: isEnabled ? onTap : null, // 关键
|
||||
customBorder: const CircleBorder(),
|
||||
splashColor: isEnabled ? null : Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
child: Ink(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: BoxDecoration(color: isEnabled ? Colors.blue : Colors.grey[300], shape: BoxShape.circle),
|
||||
child: Icon(icon, color: isEnabled ? Colors.white : Colors.grey),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(label, style: TextStyle(color: isEnabled ? Colors.black : Colors.grey)),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(label, style: TextStyle(color: isEnabled ? Colors.black : Colors.grey)),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user