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