Skip to content

Instantly share code, notes, and snippets.

@aminbenarieb
Created June 22, 2022 08:59
Show Gist options
  • Save aminbenarieb/adf63b5cc4bcd303503b05ecab83996a to your computer and use it in GitHub Desktop.
Save aminbenarieb/adf63b5cc4bcd303503b05ecab83996a to your computer and use it in GitHub Desktop.
Ignore error in future
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