discontinuedPackage flutter_gemma has been discontinued and replaced by flutter_edge_ai.

PreferencesKeys class

Centralized SharedPreferences keys for model management

SINGLE SOURCE OF TRUTH for all preference keys used by the plugin

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 Methods

bundledPath(String filename) → String
Get key for bundled file path mapping Format: 'bundled_path_{filename}'
externalPath(String filename) → String
Get key for external file path mapping Format: 'external_path_{filename}'

Constants

activeEmbeddingFilename → const String
Filename of the currently active embedding model.
activeEmbeddingSource → const String
Same encoding as activeInferenceSource, for the embedding model file.
activeEmbeddingTokenizerFilename → const String
Filename of the currently active embedding tokenizer.
activeEmbeddingTokenizerSource → const String
Same encoding as activeInferenceSource, for the embedding tokenizer.
activeInferenceFilename → const String
Filename of the currently active inference model. Required because the "installed" filename key (installedModelFileName) is legacy-only — the new multi-model system tracks installs through installedModels, not a single filename, so we need a dedicated active-pointer.
activeInferenceFileType → const String
ModelFileType.name of the currently active inference model.
activeInferenceModelType → const String
ModelType.name of the currently active inference model. Read on FlutterGemma.initialize() together with activeInferenceFileType and installedModelFileName to rehydrate _activeInferenceModel.
activeInferenceSource → const String
Encoded source for the active inference model. Format: <kind>|<value> where kind ∈ {network,asset,bundled} and value is the URL / asset path / bundle resource name. file is not encoded — Mobile uses a resolved FileSource(filePath) reconstructed from activeInferenceFilename directly.
activeSttFilename → const String
Filename of the currently active STT model.
activeSttModelType → const String
SttModelType.name of the currently active STT model — required to rehydrate SttModelSpec.sttModelType on restore (the model is SELECTABLE, so the type is not inferable from the filename alone).
activeSttSource → const String
Same encoding as activeInferenceSource, for the STT model.
activeSttTokenizerFilename → const String
Filename of the currently active STT tokenizer.
activeSttTokenizerSource → const String
Same encoding as activeInferenceSource, for the STT tokenizer.
activeTtsModelType → const String
TtsModelType.name of the active TTS model — the manifest re-derives the bundle filenames on restore, so only name + type need persisting.
activeTtsName → const String
Filename-independent identity of the active TTS model: its display name.
embeddingModelFile → const String
Legacy: Single embedding model filename
embeddingTokenizerFile → const String
Legacy: Single tokenizer filename
installedEmbeddingModels → const String
List<String> of installed embedding model files
installedLoraFileName → const String
Legacy: Single LoRA filename
installedLoras → const String
List<String> of installed LoRA files
installedModelFileName → const String
Legacy: Single inference model filename
installedModels → const String
List<String> of installed inference model files
installedTokenizers → const String
List<String> of installed tokenizer files
sttModelFile → const String
Legacy: Single STT model filename
sttTokenizerFile → const String
Legacy: Single STT tokenizer filename
webCacheLastCleanup → const String
Last cache cleanup timestamp
webCacheMetadataPrefix → const String
Prefix for web cache metadata keys Format: 'web_cache_{url.hashCode}'
webCachePersistentGranted → const String
Whether persistent storage was granted