convertPaths static method

List<ExtendedAssetEntity> convertPaths(
  1. List<String> paths, {
  2. AssetType assetsType = AssetType.image,
})

paths 文件地址转换 List

Implementation

static List<ExtendedAssetEntity> convertPaths(List<String> paths,
    {AssetType assetsType = AssetType.image}) {
  List<ExtendedAssetEntity> list = [];
  for (var element in paths) {
    if (element.isNotEmpty) {
      list.add(ExtendedAssetEntity.fromPreviewed(
          previewed: element, assetType: assetsType));
    }
  }
  return list;
}