dominantSwatch property
PaletteSwatch?
get
dominantSwatch
The dominant color as a PaletteSwatch, including its population.
Implementation
PaletteSwatch? get dominantSwatch => swatches.isEmpty ? null : swatches.first;