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