setColors method

void setColors(
  1. RibbonColors colors
)

Replaces the colour palette and repaints. Use with RibbonColors.dark / RibbonColors.light to toggle dark mode at runtime.

Implementation

void setColors(RibbonColors colors) {
  _painter = RibbonPainter(colors: colors);
  repaint();
}