TtsBundleFile class

One file of a TTS model bundle. filename is namespaced by the owning TtsModelType (every bundle member — including the .tflite graphs — since a TTS bundle has no single distinguished "model" file the way Inference/Embedding/STT specs do). prefsKey stays the PLAIN manifest basename — NOT the namespaced filename — because flutter_gemma_speech's TtsModelProfile (e.g. configFile = 'config.json') and TtsCore/MatchaTextFrontend look bundle paths up by that plain name (paths[profile.configFile]); decoupling keeps that cross-package contract intact while the on-disk/repository identity is namespaced.

Inheritance

Constructors

TtsBundleFile({required ModelSource source, required String filename, required String plainFilename})
TtsBundleFile.fromSource(ModelSource source, {required String modelId})
Creates TtsBundleFile from ModelSource, namespaced by modelId — in practice the owning TtsModelType's name (matcha/qwen3/inflect/…).
factory

Properties

extension → String
File extension for validation purposes (with leading dot, e.g., '.model')
no setterinherited
filename → String
Local filename for this file
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
isRequired → bool
Whether this file is required for the model to function
no setteroverride
minimumSizeBytes → int?
Optional per-file minimum size (bytes) for the download-corruption check. Null → the validator falls back to the extension heuristic (FileNameUtils.getMinimumSize). Override for files whose real size is legitimately below the 1 MB default (e.g. a small embedding blob).
no setteroverride
prefsKey → String
SharedPreferences key for storing this file's installation status
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → ModelSource
Source from which this file can be obtained (NEW: type-safe ModelSource)
no setteroverride

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