Skip to content

Instantly share code, notes, and snippets.

@devjaime
Last active March 21, 2021 04:52
Show Gist options
  • Select an option

  • Save devjaime/7be8defdce22d53c6ad2d54df1e28fef to your computer and use it in GitHub Desktop.

Select an option

Save devjaime/7be8defdce22d53c6ad2d54df1e28fef to your computer and use it in GitHub Desktop.
Debido a que el método tiene un nombre call, podemos declarar una instancia de clase y usarla como si fuera un método
final validator = PasswordValidator();
//puede usarlo así:
validator('test');
validator('test1234');
// no es necesario usarlo así:
validator.call('not-so-frozen-arctic');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment