fromEntity static method
Implementation
static Future<HomeMenuModel?> fromEntity(
String documentID, HomeMenuEntity? entity) async {
if (entity == null) return null;
return HomeMenuModel(
documentID: documentID,
appId: entity.appId ?? '',
name: entity.name,
iconColorOverride: await RgbModel.fromEntity(entity.iconColorOverride),
backgroundOverride:
await BackgroundModel.fromEntity(entity.backgroundOverride),
popupMenuBackgroundColorOverride:
await RgbModel.fromEntity(entity.popupMenuBackgroundColorOverride),
);
}