Last active
March 17, 2021 13:33
-
-
Save enzoz/df02742b6c48a19ab96fd58e2a58bd01 to your computer and use it in GitHub Desktop.
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() { | |
| Future<String> Function() first = () => Future.value('funciona'); | |
| Future<void> Function() quebra = () => Future.error('Quebrou'); | |
| first() | |
| .then((_) => quebra().catchError((e) => print(e.toString()))) | |
| .catchError((_) => print('Não pode entrar aqui')); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment