passwordfield flutter
/// Add to pubspec: passwordfield: ^0.1.0
/// check: https://pub.dev/packages/passwordfield
PasswordField(
color: Colors.blue,
passwordConstraint: r'.*[@$#.*].*',
inputDecoration: PasswordDecoration(),
hintText: 'must have special characters',
border: PasswordBorder(
border: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue.shade100,
),
borderRadius: BorderRadius.circular(12),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue.shade100,
),
borderRadius: BorderRadius.circular(12),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide:
BorderSide(width: 2, color: Colors.red.shade200),
),
),
errorMessage:
'must contain special character either . * @ # \$',
),