FlutterEdgeAiDesktop class

Desktop implementation of FlutterEdgeAi plugin

Uses dart:ffi to communicate directly with LiteRT-LM C API via libLiteRtLm.dylib/so/dll for model inference.

Inheritance

Properties

hashCode → int
The hash code for this object.
no setterinherited
initializedEmbeddingModel → EmbeddingModel?
no setteroverride
initializedModel → InferenceModel?
no setteroverride
modelManager → ModelFileManager
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createEmbeddingModel({PreferredBackend? preferredBackend, bool supportImage = false, bool supportAudio = false}) → Future<EmbeddingModel>
Returns the embedder for the active embedding model (set by FlutterEdgeAi.installEmbedder() or modelManager.ensureModelReadyFromSpec()) — the one already loaded when it serves the request, else a new one. The active model is the only source: explicit paths were removed in 2.3.0.
override
createModel({required ModelType modelType, ModelFileType fileType = ModelFileType.task, int maxTokens = 1024, PreferredBackend? preferredBackend, PreferredBackend? preferredVisionBackend, PreferredBackend? preferredAudioBackend, List<int>? loraRanks, int? maxNumImages, bool supportImage = false, bool supportAudio = false, MultimodalOrder? multimodalOrder, bool? enableSpeculativeDecoding, ActivationDataType? activationDataType, int? maxConcurrentSessions}) → Future<InferenceModel>
Creates and returns a new InferenceModel instance.
override
createSttModel({String? modelPath, String? tokenizerPath, PreferredBackend? preferredBackend, String? language}) → Future<SpeechRecognizer>
Creates and returns a new SpeechRecognizer instance.
override
createTtsModel({PreferredBackend? preferredBackend, String? language}) → Future<SpeechSynthesizer>
Creates and returns a new SpeechSynthesizer for the active TTS model.
override
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

instance → FlutterEdgeAiDesktop
Get the singleton instance
no setter

Static Methods

registerWith() → void
Register this implementation as the plugin instance