passValidate method

bool passValidate(
  1. String password
)

Implementation

bool passValidate(String password) {
  return RegExp(r"^(?=.?[A-Z])(?=.?[a-z])(?=.?[0-9])(?=.?[#?!@$%^&*-]).{8,}$")
      .hasMatch(password);

  /*At least one upper case English letter, (?=.?[A-Z])
  At least one lower case English letter, (?=.*?[a-z])
  At least one digit, (?=.*?[0-9])
  At least one special character, (?=.?[#?!@$%^&-])
  Minimum eight in length .{8,} (with the anchors)
  @            */
}