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

List shows loading and empty widget's at the same time #2

Closed
AAllport opened this issue May 13, 2020 · 1 comment
Closed

List shows loading and empty widget's at the same time #2

AAllport opened this issue May 13, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@AAllport
Copy link

Given the following code:

return Scaffold(
  drawer: AppDrawer(activeRoute: activeRoute),
  appBar: AppBar(title: title),
  body: CustomListView(
    empty: Text("Empty"),
    pageSize: 12,
    loadingBuilder: (BuildContext context) => Center(child: CircularProgressIndicator()),
    adapter: ListAdapter(fetchItems: (int offset, int limit) async {
      var items = await fetchItems(offset,limit);
      return ListItems(items.data, reachedToEnd: items.to == items.total);
    }),
    itemBuilder: (BuildContext context, int idx, dynamic item) => MyListItem(item),
  ),
);

Both the word "empty" and the CircularProgressIndicator are visible to the user.
Please, correct me if I'm wrong, but this doesn't seem like the intended behaviour?

image

@themisir themisir self-assigned this May 19, 2020
@themisir themisir added the bug Something isn't working label May 19, 2020
@AAllport
Copy link
Author

Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants