isValid method

bool isValid(
  1. String password
)

Returns true if the password is empty or meets all requirements.

Implementation

bool isValid(String password) =>
    isEmpty ||
    (isNotEmpty && every((requirement) => requirement.validator(password)));