ModelEntry class final
One downloadable model: where its file is, its exact size and SHA-256, and what the device needs to run and store it.
Constructors
- ModelEntry({required String id, required Uri url, required int sizeBytes, String? sha256, int version = 1, String displayName = '', String params = '', String quant = '', String format = 'gguf', ModelAvailability availability = ModelAvailability.active, bool recommended = false, int minPhysicalRamMB = 0, int minAvailableMemoryMB = 0, int minFreeDiskMB = 0})
-
An entry built by the host (for ModelManifest.parse every field is required).
sha256null skips the content check: only the size is verified.idnames the model's folder: letters, digits, '.', '_' and '-'.const
Properties
- availability → ModelAvailability
-
final
- displayName → String
-
final
- fileName → String
-
The file name the model is stored under (the URL's last segment), e.g. qwen3.5-4b-…-Q5_K_M.gguf.
no setter
- format → String
-
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
final
- isActive → bool
-
no setter
- minAvailableMemoryMB → int
-
final
- minFreeDiskMB → int
-
final
- minPhysicalRamMB → int
-
final
- params → String
-
final
- partFileName → String
-
Name of the file while it downloads and until its SHA-256 matches.
no setter
- quant → String
-
final
- recommended → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sha256 → String?
-
Lowercase hex; null only in an entry the host built.
final
- sizeBytes → int
-
final
- url → Uri
-
final
- version → int
-
final
Methods
-
fitsDisk(
DeviceCapabilities device) → bool - Whether the disk has room for the download; unknown passes (the downloader checks again natively).
-
fitsMemory(
DeviceCapabilities device) → bool - Whether RAM allows this model; unknown values pass.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
Object? json, {String path = 'model', bool requireSha256 = true}) → ModelEntry -
Parses one entry of a published manifest: every field is set,
formatisgguf, andfile.urlis an https URL ending in a .gguf file name.requireSha256false also accepts an entry withoutfile.sha256.