getAssetPathList method

Future<List<AssetPathEntity>> getAssetPathList({
  1. bool hasAll = true,
  2. bool onlyAll = false,
  3. RequestType type = RequestType.common,
  4. PMFilter? filterOption,
  5. required PMPathFilter pathFilterOption,
})

Implementation

Future<List<AssetPathEntity>> getAssetPathList({
  bool hasAll = true,
  bool onlyAll = false,
  RequestType type = RequestType.common,
  PMFilter? filterOption,
  required PMPathFilter pathFilterOption,
}) async {
  if (onlyAll) {
    hasAll = true;
  }
  filterOption ??= FilterOptionGroup();
  final Map result = await _channel.invokeMethod(
    PMConstants.mGetAssetPathList,
    <String, dynamic>{
      'type': type.value,
      'hasAll': hasAll,
      'onlyAll': onlyAll,
      'option': filterOption.toMap(),
      'pathOption': pathFilterOption.toMap(),
    },
  );
  return ConvertUtils.convertToPathList(
    result.cast(),
    type: type,
    filterOption: filterOption,
  );
}