Returns true for a valid username (3–20 chars, letters/digits/_).
true
static bool isUsername(String value) { final RegExp regex = RegExp(r'^[a-zA-Z0-9_]{3,20}$'); return regex.hasMatch(value); }