confirmPassword static method

String? confirmPassword(
  1. String? value,
  2. String password
)

Implementation

static String? confirmPassword(String? value, String password) {
  if (value == null || value.isEmpty) {
    return 'Please confirm your password';
  }
  if (value != password) {
    return 'Passwords do not match';
  }
  return null;
}