isUsername static method

bool isUsername(
  1. String text
)

Implementation

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