isValidStep static method

bool isValidStep(
  1. String s
)

Returns true if s is one of the seven diatonic step letters.

The check is case-insensitive: both 'c' and 'C' are valid.

Implementation

static bool isValidStep(String s) =>
    s.length == 1 && validSteps.contains(s.toUpperCase());