Skip to content

Commit

Permalink
💡 Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Oct 31, 2024
1 parent 2b752df commit f9f04de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions lib/src/internal/plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ class PhotoManagerPlugin with BasePlugin, IosPlugin, AndroidPlugin, OhosPlugin {
return result;
}

/// Use pagination to get album content.
/// Obtain assets with the pagination.
///
/// The length of returned assets might be less than requested.
/// Not existing assets will be excluded from the result.
Future<List<AssetEntity>> getAssetListPaged(
String id, {
required PMFilter optionGroup,
Expand All @@ -204,7 +207,10 @@ class PhotoManagerPlugin with BasePlugin, IosPlugin, AndroidPlugin, OhosPlugin {
return ConvertUtils.convertToAssetList(result.cast());
}

/// Asset in the specified range.
/// Obtain assets in the specified range.
///
/// The length of returned assets might be less than requested.
/// Not existing assets will be excluded from the result.
Future<List<AssetEntity>> getAssetListRange(
String id, {
required RequestType type,
Expand Down
8 changes: 7 additions & 1 deletion lib/src/types/entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ class AssetPathEntity {
///
/// [page] should starts with and greater than 0.
/// [size] is item count of current [page].
///
/// The length of returned assets might be less than requested.
/// Not existing assets will be excluded from the result.
Future<List<AssetEntity>> getAssetListPaged({
required int page,
required int size,
Expand All @@ -206,8 +209,11 @@ class AssetPathEntity {
/// Getting assets in range using [start] and [end].
///
/// The [start] and [end] are similar to [String.substring], but it'll return
/// the maxmium assets if the total count of assets is fewer than the range,
/// the maximum assets if the total count of assets is fewer than the range,
/// instead of throwing a [RangeError] like [String.substring].
///
/// The length of returned assets might be less than requested.
/// Not existing assets will be excluded from the result.
Future<List<AssetEntity>> getAssetListRange({
required int start,
required int end,
Expand Down

0 comments on commit f9f04de

Please sign in to comment.