ModelFile class

Represents a file associated with a model version on CivitAI.

Constructors

ModelFile({required int id, required String name, required double sizeKB, required FileType type, Map<String, String>? hashes, String? downloadUrl, bool? primary, Map<String, dynamic>? metadata})
Creates a new model file instance.
const
ModelFile.fromJson(Map<String, dynamic> json)
Creates a model file instance from a JSON map.
factory

Properties

downloadUrl String?
URL to download the file.
final
hashCode int
The hash code for this object.
no setterinherited
hashes Map<String, String>?
Hash values for the file.
final
id int
Unique identifier for the file.
final
metadata Map<String, dynamic>?
Metadata about the file.
final
name String
Name of the file.
final
primary bool?
Whether this is the primary file for the model version.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sizeKB double
Size of the file in kilobytes.
final
type FileType
Type of the file.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this model file to a JSON map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited