Skip to content

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

Open
@Dev-Salem

Description

@Dev-Salem

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationp3Issues that we currently consider unimportantwaiting for responseWaiting for follow up

    Type

    No type

    Projects

    Status

    Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions