fromEntityPlus static method
Implementation
static Future<AlbumModel?> fromEntityPlus(
String documentID, AlbumEntity? entity,
{String? appId}) async {
if (entity == null) return null;
var counter = 0;
return AlbumModel(
documentID: documentID,
appId: entity.appId ?? '',
albumEntries: entity.albumEntries == null
? null
: List<AlbumEntryModel>.from(
await Future.wait(entity.albumEntries!.map((item) {
counter++;
return AlbumEntryModel.fromEntityPlus(counter.toString(), item,
appId: appId);
}).toList())),
description: entity.description,
backgroundImage: await BackgroundModel.fromEntityPlus(
entity.backgroundImage,
appId: appId),
conditions: await StorageConditionsModel.fromEntityPlus(entity.conditions,
appId: appId),
);
}