Last active
March 21, 2021 04:52
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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