ModelVersion class
Represents a version of a model on CivitAI.
Constructors
-
ModelVersion({required int id, int? modelId, required String name, required BaseModel baseModel, String? description, required List<
String> trainedWords, required bool supportsGeneration, required List<ModelFile> files, required List<ImageModel> images, String? downloadUrl, DateTime? createdAt, DateTime? publishedAt, DateTime? earlyAccessTimeFrame, String? status, String? availability, int? clipSkip, Map<String, String?> ? hashes, bool? requireAuth, bool? checkPermission, bool? isFeatured, bool? minor}) -
Creates a new model version instance.
const
-
ModelVersion.fromJson(Map<
String, dynamic> json) -
Creates a model version instance from a JSON map.
factory
-
ModelVersion.fromMiniJson(Map<
String, dynamic> json) -
Creates a model version instance from a mini JSON response.
factory
Properties
- availability → String?
-
Availability of this version.
final
- baseModel → BaseModel
-
Base model this version is built for.
final
- checkPermission → bool?
-
Whether permission checks are needed for this version.
final
- clipSkip → int?
-
Skip value for CLIP.
final
- createdAt → DateTime?
-
When this version was created.
final
- description → String?
-
Description of this version.
final
- downloadUrl → String?
-
URL to download this version's primary file.
final
- earlyAccessTimeFrame → DateTime?
-
When early access for this version ends.
final
-
files
→ List<
ModelFile> -
Files associated with this version.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hashes
→ Map<
String, String?> ? -
Hash values for this version.
final
- id → int
-
Unique identifier for the model version.
final
-
images
→ List<
ImageModel> -
Images showcasing this version.
final
- isFeatured → bool?
-
Whether this version is featured.
final
- minor → bool?
-
Whether this version is a minor update.
final
- modelId → int?
-
Model ID this version belongs to.
final
- name → String
-
Name of this version.
final
- publishedAt → DateTime?
-
When this version was published.
final
- requireAuth → bool?
-
Whether authentication is required to download this version.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String?
-
Status of this version.
final
- supportsGeneration → bool
-
Whether this version can be used for image generation.
final
-
trainedWords
→ List<
String> -
Words the model was trained on.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this model version to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited