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

Add real life example(s) that connect to an external API #68

Open
Dev-Salem opened this issue Apr 22, 2024 · 0 comments
Open

Add real life example(s) that connect to an external API #68

Dev-Salem opened this issue Apr 22, 2024 · 0 comments

Comments

@Dev-Salem
Copy link

Is your feature request related to a problem? Please describe.

The Current examples mimic calling an api by using a list of local items, while this is enough for experienced developers to get started it's less clear for inexperienced ones, especially considering the fact that something like this:

void _fetchData() async {

setState(() { _isLoading = true; });

await Future.delayed(const Duration(seconds: 1));

if (!mounted) { return; }

setState(() {

_isLoading = false; 

// here🙂 

_items = List.generate(_items.length + 10, (i) => 'Item $i'); });

} 

is never used in real life use cases (usually each api has a page parameter that lets you go through the items)

Describe the solution you'd like

Add an example(s) that connects to an external api, preferably something familiar like Json Placeholder or TMBD.

Describe alternatives you've considered

in the doc add, links to other blog posts that use very_good_infinite_list with an external api.

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

No branches or pull requests

1 participant