fromColor method Null safety

HexColor? fromColor(
  1. Color? color
)

Implementation

static HexColor? fromColor(Color? color) {
  return color == null ? null : HexColor(color.value);
}