isUsername static method

bool isUsername(
  1. String s
)

Checks if string is a valid username.

Implementation

static bool isUsername(String s) =>
    hasMatch(s, r'^[a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]$');