fromEntityPlus static method

Future<FontModel?> fromEntityPlus(
  1. FontEntity? entity, {
  2. String? appId,
})

Implementation

static Future<FontModel?> fromEntityPlus(FontEntity? entity,
    {String? appId}) 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.fromEntityPlus(entity.color, appId: appId),
  );
}