getName static method

String getName(
  1. int level
)

Implementation

static String getName(int level) => switch (level) {
      L => 'Low',
      M => 'Medium',
      Q => 'Quartile',
      H => 'High',
      _ => throw ArgumentError('level $level not supported')
    };