NmCopilotMedia class abstract final

Ready-made copilot settings with native media: the plugin implementations on Android, iOS, macOS, Windows and Linux; on the web the copilot's own browser implementations (nmDefault*), so web builds behave as without this package.

NmCopilotConfig(
  engine: engine,
  voice: NmCopilotMedia.voice(engine: engine),
  attachments: NmCopilotMedia.attachments(),
  voiceAssistant: NmCopilotMedia.assistant(),
)

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Static Properties

web ↔ bool
Whether the browser implementations are used (true on the web; tests may flip it).
getter/setter pair

Static Methods

assistant({bool autoSend = true, String? locale}) → NmVoiceAssistantConfig
The voice assistant mode on, speaking through speechOutput; its input is the copilot's voice input.
attachments({int maxBytes = 10 << 20, int maxCount = 5, Set<NmAttachmentKind> kinds = const {NmAttachmentKind.file, NmAttachmentKind.image}}) → NmAttachmentPolicy
Attachments on, with the plugin picker (files, photo library, camera where there is one) and the limits.
picker() → NmAttachmentPicker?
The attachment picker: NmPluginAttachmentPicker; on the web nmDefaultAttachmentPicker().
recorder() → NmAudioRecorder?
The recorder: NmRecordAudioRecorder; on the web nmDefaultAudioRecorder() (null without MediaRecorder).
speechOutput() → NmSpeechOutput?
The speech output: NmTtsSpeechOutput (null on Linux, where flutter_tts has no implementation); on the web nmDefaultSpeechOutput().
voice({NmCopilotEngine? engine, NmVoiceMode mode = NmVoiceMode.device, String? locale}) → NmVoiceConfig
Voice settings for mode: NmVoiceMode.device uses the platform recogniser (NmDeviceVoiceInput; on the web nmDefaultVoiceInput(engine), the browser recogniser or recording with server transcription), NmVoiceMode.server records (recorder) for engine.transcribe. locale is the recognition locale (the app's when null).
voiceInput({NmCopilotEngine? engine, String? locale}) → NmVoiceInput?
The recogniser: NmDeviceVoiceInput (null on Linux, where speech_to_text has no implementation); on the web nmDefaultVoiceInput(engine) (with engine) or the browser recogniser alone (null when the browser has none).