colorSwatch method

ZetaColorSwatch colorSwatch(
  1. BuildContext context
)

Gets color swatch from ZetaWidgetStatus

Implementation

ZetaColorSwatch colorSwatch(BuildContext context) {
  final colors = Zeta.of(context).colors;
  switch (this) {
    case ZetaWidgetStatus.info:
      return colors.surfaceInfo;
    case ZetaWidgetStatus.positive:
      return colors.surfacePositive;
    case ZetaWidgetStatus.warning:
      return colors.surfaceWarning;
    case ZetaWidgetStatus.negative:
      return colors.surfaceNegative;
    case ZetaWidgetStatus.neutral:
      return colors.cool;
  }
}