Answers for "passwordfield flutter"

0

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 . * @ # \$',
),
Posted by: Guest on September-18-2021

Browse Popular Code Answers by Language