Skip to content
This repository was archived by the owner on Oct 8, 2023. It is now read-only.

Added Type <T> & WhenError() handler#1

Merged
sleeyax merged 2 commits intosleeyax:masterfrom
tekno0ryder:master
Jan 16, 2020
Merged

Added Type <T> & WhenError() handler#1
sleeyax merged 2 commits intosleeyax:masterfrom
tekno0ryder:master

Conversation

@tekno0ryder
Copy link
Copy Markdown
Contributor

@tekno0ryder tekno0ryder commented Jan 16, 2020

1- Added Type to the class definition as in FutureBuilder
2- Added whenError(Object error) that handles exceptions if (snapshot.hasError) is true, fallback to WhenNotDone() if not provided
3- Mark WhenNotDone() as required so that a return statement is always guaranteed to return

@tekno0ryder tekno0ryder changed the title Added Type <T> & Updated example accordingly Added Type <T> & WhenError() handler Jan 16, 2020
@sleeyax
Copy link
Copy Markdown
Owner

sleeyax commented Jan 16, 2020

Looks good, thanks!

@sleeyax sleeyax merged commit 6dd2abc into sleeyax:master Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants