isLegacyRef static method

bool isLegacyRef(
  1. String ref
)

Backward compatibility: check if ref looks like old format

Implementation

static bool isLegacyRef(String ref) {
  // Old format: btn_0, tf_1, sw_2, etc.
  return RegExp(r'^[a-z]+_\d+$').hasMatch(ref);
}