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,
}) {
  final filter = filterOption ?? PMFilter.defaultValue();
  return _channel.invokeMethod<Map>(PMConstants.mGetAssetsByRange, {
    'type': type.value,
    'start': start,
    'end': end,
    'option': filter.toMap(),
  }).then((value) {
    if (value == null) return [];
    return ConvertUtils.convertToAssetList(
      value.cast<String, dynamic>(),
    );
  });
}