FontColorButton.fromColor constructor

FontColorButton.fromColor(
  1. String color,
  2. Function onClick
)

creates a FontColorButton from the HTML-color definition alone, which is then parsed to a Material Color

Implementation

factory FontColorButton.fromColor(String color, Function onClick) =>
    FontColorButton(
      hexCode: color,
      color: ColorUtils.colorForHex(color),
      onClick: onClick,
    );