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

Obtain assets with the pagination.

The length of returned assets might be less than requested. Not existing assets will be excluded from the result.

Implementation

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