feat: integrate chat voice and diagnostics client
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import 'dart:async' show unawaited;
|
||||
|
||||
import 'package:haptic_kit/haptic_kit.dart';
|
||||
|
||||
/// Prepare mobile haptics without surfacing platform failures.
|
||||
void prepareVoiceHaptics() {
|
||||
unawaited(Haptics.prepare().catchError((_) => false));
|
||||
}
|
||||
|
||||
/// Play the standard touch PTT haptic without surfacing platform failures.
|
||||
void playVoicePttHaptic(bool held) {
|
||||
final haptic = held
|
||||
? Haptics.impact(HapticImpactStyle.medium)
|
||||
: Haptics.selection();
|
||||
unawaited(haptic.catchError((_) {}));
|
||||
}
|
||||
Reference in New Issue
Block a user