Created
June 22, 2022 08:59
-
-
Save aminbenarieb/adf63b5cc4bcd303503b05ecab83996a to your computer and use it in GitHub Desktop.
Ignore error in future
This file contains 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() async { | |
print(await foo().catchError((_) => false)); | |
} | |
Future<bool> foo() async { | |
throw Error(); | |
// return Future.value(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment