convertFiles static method

List<ExtendedAssetEntity> convertFiles(
  1. List<File> files, {
  2. AssetType assetsType = AssetType.image,
})

files 文件地址转换 List

Implementation

static List<ExtendedAssetEntity> convertFiles(List<File> files,
    {AssetType assetsType = AssetType.image}) {
  List<ExtendedAssetEntity> list = [];
  for (var element in files) {
    if (element.existsSync()) {
      list.add(
          ExtendedAssetEntity.fromFile(file: element, assetType: assetsType));
    }
  }
  return list;
}