Model class
Represents a model on CivitAI.
Constructors
-
Model({required int id, required String name, String? description, required ModelType type, required bool nsfw, required bool poi, String? mode, CreatorInfo? creator, required List<
String> tags, required List<ModelVersion> modelVersions, ModelStats? stats, String? imageUrl, DateTime? createdAt, DateTime? updatedAt, DateTime? publishedAt, ModelStatus? status, bool? earlyAccessEnabled, String? downloadUrl}) -
Creates a new model instance.
const
-
Model.fromJson(Map<
String, dynamic> json) -
Creates a model instance from a JSON map.
factory
Properties
- createdAt → DateTime?
-
Date when the model was created.
final
- creator → CreatorInfo?
-
Information about the creator of the model.
final
- description → String?
-
Description of the model.
final
- downloadUrl → String?
-
URL to download the model.
final
- earlyAccessEnabled → bool?
-
Whether early access is enabled for this model.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Unique identifier for the model.
final
- imageUrl → String?
-
URL for the model's main image.
final
- mode → String?
-
Additional mode information.
final
-
modelVersions
→ List<
ModelVersion> -
List of model versions.
final
- name → String
-
Name of the model.
final
- nsfw → bool
-
Whether the model contains NSFW content.
final
- poi → bool
-
Whether the model is based on a real person (person of interest).
final
- publishedAt → DateTime?
-
Date when the model was published.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stats → ModelStats?
-
Statistics about the model.
final
- status → ModelStatus?
-
Current status of the model.
final
-
Tags associated with the model.
final
- type → ModelType
-
Type of the model.
final
- updatedAt → DateTime?
-
Date when the model was last updated.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this model to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited