getAssetListWithRange method

Future<List<AssetEntity>> getAssetListWithRange({
  1. required int start,
  2. required int end,
  3. RequestType type = RequestType.common,
  4. PMFilter? filterOption,
})

Implementation

Future<List<AssetEntity>> getAssetListWithRange({
  required int start,
  required int end,
  RequestType type = RequestType.common,
  PMFilter? filterOption,
}) async {
  final filter = filterOption ?? PMFilter.defaultValue();
  final Map result = await _channel.invokeMethod(
    PMConstants.mGetAssetsByRange,
    <String, dynamic>{
      'type': type.value,
      'start': start,
      'end': end,
      'option': filter.toMap(),
    },
  );
  return ConvertUtils.convertToAssetList(result.cast());
}