fix(ui): 移除堆叠卡片组件的震动反馈功能
移除 HapticFeedback 调用,避免触发华为安全检测 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
92772f071a
commit
e3300a1163
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// 堆叠卡片组件
|
||||
/// 用于显示待领取奖励等明细列表,卡片堆叠显示,可上下滑动选择
|
||||
|
|
@ -86,10 +85,9 @@ class _StackedCardsWidgetState<T> extends State<StackedCardsWidget<T>>
|
|||
_selectedIndex = newIndex;
|
||||
});
|
||||
|
||||
// 触发声音和震动反馈
|
||||
// 记录上次反馈索引
|
||||
if (widget.enableSound && newIndex != _lastFeedbackIndex) {
|
||||
_lastFeedbackIndex = newIndex;
|
||||
HapticFeedback.selectionClick();
|
||||
}
|
||||
|
||||
widget.onSelectedIndexChanged?.call(newIndex);
|
||||
|
|
@ -111,10 +109,6 @@ class _StackedCardsWidgetState<T> extends State<StackedCardsWidget<T>>
|
|||
curve: Curves.easeOutCubic,
|
||||
);
|
||||
|
||||
if (widget.enableSound) {
|
||||
HapticFeedback.lightImpact();
|
||||
}
|
||||
|
||||
widget.onSelectedIndexChanged?.call(index);
|
||||
}
|
||||
|
||||
|
|
@ -340,9 +334,6 @@ class _StackedCardsViewState<T> extends State<StackedCardsView<T>> {
|
|||
_dragOffset = 0;
|
||||
if (newIndex != _selectedIndex) {
|
||||
_selectedIndex = newIndex;
|
||||
if (widget.enableSound) {
|
||||
HapticFeedback.selectionClick();
|
||||
}
|
||||
widget.onSelectedIndexChanged?.call(newIndex);
|
||||
}
|
||||
});
|
||||
|
|
@ -355,10 +346,6 @@ class _StackedCardsViewState<T> extends State<StackedCardsView<T>> {
|
|||
_selectedIndex = index;
|
||||
});
|
||||
|
||||
if (widget.enableSound) {
|
||||
HapticFeedback.lightImpact();
|
||||
}
|
||||
|
||||
widget.onSelectedIndexChanged?.call(index);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue