add public APIs' dartdoc comments
This commit is contained in:
parent
e9ecd562f5
commit
84cad566db
@ -130,6 +130,7 @@ class PhotoGallery {
|
||||
});
|
||||
}
|
||||
|
||||
/// Clean medium file cache
|
||||
static Future<void> cleanCache() async {
|
||||
_channel.invokeMethod('cleanCache', {});
|
||||
}
|
||||
|
@ -2,10 +2,14 @@ part of photogallery;
|
||||
|
||||
/// A medium type.
|
||||
enum MediumType {
|
||||
/// MediumType.image
|
||||
image,
|
||||
|
||||
/// MediumType.video
|
||||
video,
|
||||
}
|
||||
|
||||
/// Convert MediumType to String
|
||||
String? mediumTypeToJson(MediumType? value) {
|
||||
switch (value) {
|
||||
case MediumType.image:
|
||||
@ -17,6 +21,7 @@ String? mediumTypeToJson(MediumType? value) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Parse String to MediumType
|
||||
MediumType? jsonToMediumType(String? value) {
|
||||
switch (value) {
|
||||
case 'image':
|
||||
|
@ -2,6 +2,7 @@ part of photogallery;
|
||||
|
||||
/// Fetches the given album thumbnail from the gallery.
|
||||
class AlbumThumbnailProvider extends ImageProvider<AlbumThumbnailProvider> {
|
||||
/// ImageProvider of album thumbnail
|
||||
const AlbumThumbnailProvider({
|
||||
required this.album,
|
||||
this.height,
|
||||
@ -9,9 +10,16 @@ class AlbumThumbnailProvider extends ImageProvider<AlbumThumbnailProvider> {
|
||||
this.highQuality = false,
|
||||
});
|
||||
|
||||
/// Album info
|
||||
final Album album;
|
||||
|
||||
/// Height of album thumbnail
|
||||
final int? height;
|
||||
|
||||
/// Width of album thumbnail
|
||||
final int? width;
|
||||
|
||||
/// Whether using high quality of album thumbnail
|
||||
final bool? highQuality;
|
||||
|
||||
@override
|
||||
|
@ -2,12 +2,16 @@ part of photogallery;
|
||||
|
||||
/// Fetches the given image from the gallery.
|
||||
class PhotoProvider extends ImageProvider<PhotoProvider> {
|
||||
/// ImageProvider of photo
|
||||
PhotoProvider({
|
||||
required this.mediumId,
|
||||
this.mimeType,
|
||||
});
|
||||
|
||||
/// Medium id
|
||||
final String mediumId;
|
||||
|
||||
/// Mime type
|
||||
final String? mimeType;
|
||||
|
||||
@override
|
||||
|
@ -2,6 +2,7 @@ part of photogallery;
|
||||
|
||||
/// Fetches the given medium thumbnail from the gallery.
|
||||
class ThumbnailProvider extends ImageProvider<ThumbnailProvider> {
|
||||
/// ImageProvider of medium thumbnail
|
||||
const ThumbnailProvider({
|
||||
required this.mediumId,
|
||||
this.mediumType,
|
||||
@ -10,10 +11,19 @@ class ThumbnailProvider extends ImageProvider<ThumbnailProvider> {
|
||||
this.highQuality = false,
|
||||
});
|
||||
|
||||
/// Medium id
|
||||
final String mediumId;
|
||||
|
||||
/// Medium type
|
||||
final MediumType? mediumType;
|
||||
|
||||
/// Height of medium thumbnail
|
||||
final int? height;
|
||||
|
||||
/// Width of medium thumbnail
|
||||
final int? width;
|
||||
|
||||
/// Whether using high quality of medium thumbnail
|
||||
final bool? highQuality;
|
||||
|
||||
@override
|
||||
|
@ -3,6 +3,7 @@ part of photogallery;
|
||||
/// A list of media with pagination support.
|
||||
@immutable
|
||||
class MediaPage {
|
||||
/// The album that belongs to
|
||||
final Album album;
|
||||
|
||||
/// The start offset for those media.
|
||||
@ -11,6 +12,7 @@ class MediaPage {
|
||||
/// The current items.
|
||||
final List<Medium> items;
|
||||
|
||||
/// Whether using light weight option
|
||||
final bool? lightWeight;
|
||||
|
||||
/// The end index in the album.
|
||||
|
Loading…
x
Reference in New Issue
Block a user