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,
})

Asset in the specified range.

Implementation

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

  return ConvertUtils.convertToAssetList(map.cast<String, dynamic>());
}