isUserNameValid property

bool get isUserNameValid

Determines whether the string is a valid username or not.

Implementation

bool get isUserNameValid => isNotEmpty && length >= 2 && !contains(" ");