Skip to content

Instantly share code, notes, and snippets.

@jbojcic1
Created June 16, 2020 20:56
Show Gist options
  • Select an option

  • Save jbojcic1/da4a4a07928759748bda80b87a22531e to your computer and use it in GitHub Desktop.

Select an option

Save jbojcic1/da4a4a07928759748bda80b87a22531e to your computer and use it in GitHub Desktop.
void main() {
final test = Future.value('hey');
test.then((x) {
print('then 1. $x');
throw 'test';
}).catchError((e) {
print('catch 1. $e');
return 'fda';
}).then((x) {
print('then 2. $x');
}).catchError((e) {
print('catch 2. $e');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment