GalleryItem class

Item in a GalleryPopup.

GalleryItem is treated as a video if isVideo is true, or as an image otherwise.

Constructors

GalleryItem({String? id, required String link, required String name, required int? size, int? width, int? height, String? checksum, ThumbHash? thumbhash, bool isVideo = false, FutureOr<void> onError()?})
GalleryItem.image(String link, String name, {String? id, int? size, int? width, int? height, String? checksum, ThumbHash? thumbhash, FutureOr<void> onError()?})
Constructs a GalleryItem treated as an image.
factory
GalleryItem.video(String link, String name, {String? id, int? size, String? checksum, FutureOr<void> onError()?})
Constructs a GalleryItem treated as a video.
factory

Properties

checksum String?
SHA-256 checksum of the file this GalleryItem represents.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Height of the image this GalleryItem represents.
final
id String?
Unique identifier of this GalleryItem, if any.
final
isVideo bool
Indicator whether this GalleryItem is treated as a video.
final
Original URL to the file this GalleryItem represents.
getter/setter pair
name String
Name of the file this GalleryItem represents.
final
onError FutureOr<void> Function()?
Callback, called on the fetch errors of this GalleryItem.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int?
Size in bytes of the file this GalleryItem represents.
final
thumbhash ThumbHash?
ThumbHash of the image this GalleryItem represents.
final
width int?
Width of the image this GalleryItem represents.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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