PhotoGallery class

Accessing the native photo gallery.

Constructors

PhotoGallery()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

cleanCache() Future<void>
Clean medium file cache
deleteMedium({required String mediumId, MediumType? mediumType}) Future<void>
Delete medium by medium id mediumId: the identifier of medium mediumType: the type of medium
getAlbumThumbnail({required String albumId, MediumType? mediumType, bool newest = true, int? width, int? height, bool? highQuality = false}) Future<List<int>>
Get album thumbnail by album id mediumType: the type of medium newest: whether to get the newest medium or oldest medium as album thumbnail width: the width of thumbnail height: the height of thumbnail highQuality: whether to use high quality of album thumbnail
getFile({required String mediumId, MediumType? mediumType, String? mimeType}) Future<File>
get medium file by medium id mediumType: the type of medium mimeType: the mime type of medium
getMedium({required String mediumId, MediumType? mediumType}) Future<Medium>
Get medium metadata by medium id mediumId: the identifier of medium mediumType: the type of medium
getThumbnail({required String mediumId, MediumType? mediumType, int? width, int? height, bool? highQuality = false}) Future<List<int>>
Get medium thumbnail by medium id mediumId: the identifier of medium width: the width of medium height: the height of medium heightQuality: whether to use high quality of medium thumbnail
listAlbums({MediumType? mediumType, bool newest = true, bool hideIfEmpty = true}) Future<List<Album>>
List all available gallery albums and counts number of items of MediumType. mediumType: medium type of albums newest: whether to sort media by latest date in albums hideIfEmpty: whether to hide empty albums, only available on iOS