VoiceServiceConfig class

Callback signatures for provider-agnostic voice operations.

Callers inject platform/provider implementations so the service itself carries no hard dependency on a specific STT or TTS SDK.

Constructors

VoiceServiceConfig({required bool featureEnabled, required bool hasAuth(), required Future<String?> checkRecordingAvailability(), required Future<bool> requestMicrophonePermission(), required Future<bool> saveVoiceEnabled(bool enabled), required bool readVoiceEnabled(), required String? readLanguagePreference()})
Creates a VoiceServiceConfig.
const

Properties

checkRecordingAvailability Future<String?> Function()
Check whether recording hardware is available and permitted. Returns null when available, or a human-readable reason string when not.
final
featureEnabled bool
Whether the feature flag allows voice mode to be shown / used. Replaces the GrowthBook kill-switch with a plain boolean.
final
hasAuth bool Function()
Whether the user has valid authentication for voice streaming.
final
hashCode int
The hash code for this object.
no setterinherited
readLanguagePreference String? Function()
Read the current language preference from settings (may be null).
final
readVoiceEnabled bool Function()
Read the current voiceEnabled flag from persisted settings.
final
requestMicrophonePermission Future<bool> Function()
Request microphone permission from the OS. Returns true if granted.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveVoiceEnabled Future<bool> Function(bool enabled)
Persist a settings change (e.g. voiceEnabled: true).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited