convertUrls static method
url
地址转换 List
Implementation
static List<ExtendedAssetEntity> convertUrls(String url,
{AssetType assetsType = AssetType.image, String? splitPattern}) {
List<ExtendedAssetEntity> list = [];
if (url.isEmpty) return list;
if (splitPattern != null && url.contains(splitPattern)) {
final urls = url.split(splitPattern);
for (var element in urls) {
if (element.isNotEmpty) {
list.add(ExtendedAssetEntity.fromPreviewed(
previewed: element, assetType: assetsType));
}
}
} else {
list.add(ExtendedAssetEntity.fromPreviewed(
assetType: assetsType, previewed: url));
}
return list;
}