Created
March 21, 2021 04:58
-
-
Save devjaime/32720a07e60bb7973198827a2307cd44 to your computer and use it in GitHub Desktop.
Aquí hay un código que define una función anónima y la asigna a una variable sayHi (di hola)
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
| void main() { | |
| final sayHi = (name) => 'Hi, $name'; | |
| welcome(sayHi, 'Jaime'); | |
| } | |
| void welcome(String Function(String) greet, | |
| String name) { | |
| print(greet(name)); | |
| print('Bienvenido al curso'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment