getAssetListRange method

Future<List<AssetEntity>> getAssetListRange(
  1. String id, {
  2. required RequestType type,
  3. required int start,
  4. required int end,
  5. required PMFilter optionGroup,
})

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.

Implementation

Future<List<AssetEntity>> getAssetListRange(
  String id, {
  required RequestType type,
  required int start,
  required int end,
  required PMFilter optionGroup,
}) async {
  final Map map = await _channel.invokeMethod(
    PMConstants.mGetAssetListRange,
    <String, dynamic>{
      'id': id,
      'type': type.value,
      'start': start,
      'end': end,
      'option': optionGroup.toMap(),
    },
  );
  return ConvertUtils.convertToAssetList(map.cast());
}