Skip to content

Instantly share code, notes, and snippets.

@boeledi
Created December 1, 2018 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boeledi/b8afa77f2afd438120a7ae618acbc083 to your computer and use it in GitHub Desktop.
Save boeledi/b8afa77f2afd438120a7ae618acbc083 to your computer and use it in GitHub Desktop.
Stream<String> get confirmPassword => _passwordConfirmController.stream.transform(validatePassword)
.doOnData((String c){
// If the password is accepted (after validation of the rules)
// we need to ensure both password and retyped password match
if (0 != _passwordController.value.compareTo(c)){
// If they do not match, add an error
_passwordConfirmController.addError("No Match");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment