fromEntity static method
Implementation
static Future<FontModel?> fromEntity(FontEntity? entity) async {
if (entity == null) return null;
return FontModel(
fontName: entity.fontName,
size: entity.size,
weight: toEliudFontWeight(entity.weight),
style: toEliudFontStyle(entity.style),
decoration: toEliudFontDecoration(entity.decoration),
color: await RgbModel.fromEntity(entity.color),
);
}