isPassword property

bool get isPassword

Determines whether a given string represents a valid password. Passwords must have a minimum length of 8 characters and contain at least one uppercase letter, one lowercase letter, one digit, and one special character.

Implementation

bool get isPassword => _hasMatch(
      this,
      r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$',
    );