ImageModel class

Represents an image on CivitAI.

Constructors

ImageModel({required int id, required String url, String? hash, int? width, int? height, NsfwLevel? nsfwLevel, MediaType? type, bool? nsfw, int? browsingLevel, DateTime? createdAt, int? postId, String? username, String? baseModel, Map<String, dynamic>? meta, ImageStats? stats})
Creates a new image instance.
const
ImageModel.fromJson(Map<String, dynamic> json)
Creates an image instance from a JSON map.
factory

Properties

baseModel String?
Base model used to create the image.
final
browsingLevel int?
Browsing level for the image.
final
createdAt DateTime?
When the image was created.
final
hash String?
Hash of the image.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Height of the image in pixels.
final
id int
Unique identifier for the image.
final
meta Map<String, dynamic>?
Metadata about the image.
final
nsfw bool?
Whether the image contains NSFW content.
final
nsfwLevel NsfwLevel?
NSFW level of the image.
final
postId int?
Post ID the image is associated with.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stats ImageStats?
Statistics about the image.
final
type MediaType?
Type of the image.
final
url String
URL to the image.
final
username String?
Username of the image creator.
final
width int?
Width of the image in pixels.
final

Methods

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

Operators

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