Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass error to the error builders? #14

Closed
hacker1024 opened this issue Nov 4, 2020 · 1 comment
Closed

Pass error to the error builders? #14

hacker1024 opened this issue Nov 4, 2020 · 1 comment

Comments

@hacker1024
Copy link
Contributor

At the moment, PagingController.error is only used in a null check.
It'd be great if this value could be passed into the error builders, as it's cleaner than having to fetch it from the original source in the build function.

@EdsonBueno
Copy link
Owner

EdsonBueno commented Nov 4, 2020

In the earliest versions of the package, the error used to be included in the error builders.
I changed it because of a few points:

  • People found it confusing: What's the difference between the error in the builder and the one in the PagingController?
  • Should we include the PagingController.retryLastRequest there as well?
  • What about the noItemsFoundIndicatorBuilder? It certainly doesn't make sense to provide an error there, but what about the retryLastRequest callback?

That all being said, having the PagingController as the single source is the best/cleaner choice. It keeps the API minimal!

I'm closing this issue. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants