allowed static method

bool allowed(
  1. String from,
  2. String to
)

The transitions a receiver may make (task status lifecycle).

Implementation

static bool allowed(String from, String to) => switch (from) {
      working => to == inputRequired || terminal.contains(to),
      inputRequired => to == working || terminal.contains(to),
      _ => false,
    };