swatch property

MaterialColor swatch

Get the swatch of the color

Implementation

MaterialColor get swatch =>
    Colors.primaries.firstWhere((Color c) => c.value == value,
        orElse: () => MaterialColor(value, getMaterialColorValues));