getAssetListPaged method

Future<List<AssetEntity>> getAssetListPaged(
  1. String id, {
  2. required PMFilter optionGroup,
  3. int page = 0,
  4. int size = 15,
  5. RequestType type = RequestType.common,
})

Use pagination to get album content.

Implementation

Future<List<AssetEntity>> getAssetListPaged(
  String id, {
  required PMFilter optionGroup,
  int page = 0,
  int size = 15,
  RequestType type = RequestType.common,
}) async {
  final Map<dynamic, dynamic> result =
      await _channel.invokeMethod<Map<dynamic, dynamic>>(
    PMConstants.mGetAssetListPaged,
    <String, dynamic>{
      'id': id,
      'type': type.value,
      'page': page,
      'size': size,
      'option': optionGroup.toMap(),
    },
  ) as Map<dynamic, dynamic>;
  return ConvertUtils.convertToAssetList(result.cast<String, dynamic>());
}