fromEntity static method

Future<RgbModel?> fromEntity(
  1. RgbEntity? entity
)

Implementation

static Future<RgbModel?> fromEntity(RgbEntity? entity) async {
  if (entity == null) return null;
  return RgbModel(
    r: entity.r,
    g: entity.g,
    b: entity.b,
    opacity: entity.opacity,
  );
}