getColor method

Color getColor(
  1. Severity? severity
)

Gets the appropriate color for the given severity.

Implementation

Color getColor(Severity? severity) => switch (severity) {
  Severity.info => Colors.transparent,
  Severity.warning => Colors.orange,
  Severity.error => Colors.red,
  Severity.critical => Colors.red.shade900,
  null => Colors.transparent,
};