feat(voice): pulse mic button with live amplitude
VoiceState now carries a normalized mic amplitude (0..1) updated from the existing onAmplitudeChanged subscription, with a 0.02 change threshold so we don't spam rebuilds. VoiceMicButton swaps the constant-rate AnimationController for an AnimatedScale + animated glow driven by the live amplitude. 0.1 floor keeps the button breathing on silence; 120ms ease-out smooths between 200ms samples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -653,6 +653,7 @@ class _QuickCaptureBarState extends ConsumerState<_QuickCaptureBar> {
|
||||
VoiceMicButton(
|
||||
mode: ref.watch(voiceProvider).mode,
|
||||
voiceModeActive: ref.watch(voiceProvider).voiceModeActive,
|
||||
amplitude: ref.watch(voiceProvider).amplitude,
|
||||
onTap: _toggleCaptureMic,
|
||||
),
|
||||
IconButton(
|
||||
|
||||
Reference in New Issue
Block a user