Stage 3 of #139
Route the 3 raw HapticFeedback bypass calls through LdHaptics.emit and fix wrong intensity in tab navigation.
Files to modify
lib/src/button.dart:217–219 — replace HapticFeedback.heavyImpact() × 2 with await LdHaptics.emit(context, LdHapticsEvent.buttonError) × 2 (200ms gap preserved in caller); remove HapticFeedback usage from this call path
lib/src/date_picker.dart:194 — replace HapticFeedback.selectionClick() with LdHaptics.emit(context, LdHapticsEvent.selection)
lib/src/appbar/tab_navigation.dart:157 — replace LdHaptics.vibrate(HapticsType.heavy) with LdHaptics.emit(context, LdHapticsEvent.indicatorDrag) (backend maps to selection-class, fixing the wrong-intensity bug)
lib/src/appbar/tab_navigation.dart:169 — replace LdHaptics.vibrate(HapticsType.light) with LdHaptics.emit(context, LdHapticsEvent.selection)
Testing
- Widget test per modified component with injected
MockHapticsBackend via LdThemeProvider(hapticsBackend: mock)
- Verify exact
LdHapticsEvent fired for each gesture
- Verify zero raw
HapticFeedback calls: grep -r 'HapticFeedback\.' lib/ --include='*.dart' must return empty
Dependencies
Depends on Stage 1 (#140) and Stage 2 (#141)
Stage 3 of #139
Route the 3 raw
HapticFeedbackbypass calls throughLdHaptics.emitand fix wrong intensity in tab navigation.Files to modify
lib/src/button.dart:217–219— replaceHapticFeedback.heavyImpact()× 2 withawait LdHaptics.emit(context, LdHapticsEvent.buttonError)× 2 (200ms gap preserved in caller); removeHapticFeedbackusage from this call pathlib/src/date_picker.dart:194— replaceHapticFeedback.selectionClick()withLdHaptics.emit(context, LdHapticsEvent.selection)lib/src/appbar/tab_navigation.dart:157— replaceLdHaptics.vibrate(HapticsType.heavy)withLdHaptics.emit(context, LdHapticsEvent.indicatorDrag)(backend maps toselection-class, fixing the wrong-intensity bug)lib/src/appbar/tab_navigation.dart:169— replaceLdHaptics.vibrate(HapticsType.light)withLdHaptics.emit(context, LdHapticsEvent.selection)Testing
MockHapticsBackendviaLdThemeProvider(hapticsBackend: mock)LdHapticsEventfired for each gestureHapticFeedbackcalls:grep -r 'HapticFeedback\.' lib/ --include='*.dart'must return emptyDependencies
Depends on Stage 1 (#140) and Stage 2 (#141)