From 67ca4415a9ea2d185a68f8225bbbd6e6faf27101 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Sat, 22 Aug 2020 17:02:16 +0800 Subject: [PATCH] add some comments on public APIs --- lib/photo_gallery.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/photo_gallery.dart b/lib/photo_gallery.dart index a8ada82..04dcf4c 100644 --- a/lib/photo_gallery.dart +++ b/lib/photo_gallery.dart @@ -21,8 +21,7 @@ part 'src/models/medium.dart'; class PhotoGallery { static const MethodChannel _channel = const MethodChannel('photo_gallery'); - /// List all available photo gallery albums and counts number of - /// items of [MediumType]. + /// List all available gallery albums and counts number of items of [MediumType]. static Future> listAlbums({ @required MediumType mediumType, }) async { @@ -33,6 +32,7 @@ class PhotoGallery { return json.map((x) => Album.fromJson(x)).toList(); } + /// List all available media in a specific album, support pagination of media static Future _listMedia({ @required Album album, @required int total, @@ -50,6 +50,7 @@ class PhotoGallery { return MediaPage.fromJson(album, json); } + /// Get medium metadata by medium id static Future getMedium({ @required String mediumId, MediumType mediumType, @@ -62,6 +63,7 @@ class PhotoGallery { return Medium.fromJson(json); } + /// Get medium thumbnail by medium id static Future> getThumbnail({ @required String mediumId, MediumType mediumType, @@ -80,6 +82,7 @@ class PhotoGallery { return bytes; } + /// Get album thumbnail by album id static Future> getAlbumThumbnail({ @required String albumId, int width, @@ -96,6 +99,7 @@ class PhotoGallery { return bytes; } + /// get medium file by medium id static Future getFile({ @required String mediumId, MediumType mediumType,