getAssetPathList method
Future<List<AssetPathEntity> >
getAssetPathList({
- bool hasAll = true,
- bool onlyAll = false,
- RequestType type = RequestType.common,
- PMFilter? filterOption,
- 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) {
assert(hasAll, 'If only is true, then the hasAll must be not null.');
}
filterOption ??= FilterOptionGroup();
final result = await _channel.invokeMethod<Map>(
PMConstants.mGetAssetPathList,
<String, dynamic>{
'type': type.value,
'hasAll': hasAll,
'onlyAll': onlyAll,
'option': filterOption.toMap(),
'pathOption': pathFilterOption.toMap(),
},
);
if (result == null) {
return <AssetPathEntity>[];
}
return ConvertUtils.convertToPathList(
result.cast(),
type: type,
filterOption: filterOption,
);
}