fromAssetEntities static method

Future<List<AssetModel>> fromAssetEntities(
  1. List<AssetEntity> entities
)

Create asset model list from asset entity list

Implementation

static Future<List<AssetModel>> fromAssetEntities(
    List<AssetEntity> entities) async {
  final List<AssetModel> assets = <AssetModel>[];
  await Future.forEach(entities, (AssetEntity entity) async {
    final AssetModel asset = await fromAssetEntity(entity);
    assets.add(asset);
  });
  return assets;
}