Image class

Image.

Implementers
Annotations
  • @immutable
  • @MappableClass(includeCustomMappers: [ImageTypeMapper])

Constructors

Image({required int id, required int media, required ImageType type, int? width, int? height})
const

Properties

filename String
no setter
hashCode int
The hash code for this object.
no setterinherited
height int?
Image height in pixels.
final
id int
Image ID.
final
isCover bool
Whether image is a book cover.
no setter
isThumbnail bool
Whether image is thumbnail.
no setter
media int
Associated book media gallery ID.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thumbnail ImageThumbnail
Image thumbnail. If called upon thumbnail or cover returns this object.
no setter
type ImageType
Image type (provides format and extension).
final
width int?
Image width in pixels.
final

Methods

getFullFilename(String filename) String
getUrl({API? api, Hosts? hosts}) Uri
Returns image url using hosts settings from api client or provided hosts config.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
inherited
toMap() Map<String, dynamic>
inherited
toString() String
Returns image description that is associated book media and image filename.
override

Operators

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

Static Properties

parse Image Function(dynamic value)
Parses Image instance from a given value.
no setter
parseJson Image Function(String json)
Parses JSON string into Image similarly to parse.
no setter
parseJsonList List<Image> Function(String json)
Parses JSON string into List of Image instances similarly to parseList.
no setter
parseList List<Image> Function(dynamic value)
Parses List of Image instances from a given value.
no setter