fromEntity static method

Future<FontModel?> fromEntity(
  1. FontEntity? entity
)

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),
  );
}