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

Extend LastChildLayoutType.fullCrossAxisExtent to leading item #28

Closed
dna-f opened this issue Oct 5, 2021 · 4 comments
Closed

Extend LastChildLayoutType.fullCrossAxisExtent to leading item #28

dna-f opened this issue Oct 5, 2021 · 4 comments

Comments

@dna-f
Copy link

dna-f commented Oct 5, 2021

Hi,
is there a way to extend fullCrossAxisExtent to the first item?
Imagine a loader on the top of the grid or a button to reload content in case of errors ...

      lastChildLayoutTypeBuilder: (index) {
        if ((index == 0 && reloadRequired) ||
            ((index == 0 && isLoadingAll) ||
                (index == dataLength - 1 && isLoadingMore)) ||
            (index == dataLength - 1 && !isLoadingAll)) {
          return LastChildLayoutType.fullCrossAxisExtent;
        }

        return LastChildLayoutType.none;
      },

Thanks,
Andrea

@zmtzawqlp
Copy link
Member

CustomScrollview will better

@dna-f
Copy link
Author

dna-f commented Oct 8, 2021

Hi,
I'm already using a CustomScrollview and between its slivers, there is a component (I made), a sort of "black box", that is listening on the stream of data.
The waterflow_flow widget is embedded inside this component.
The component receives the stream of data and should decide to show the loader on top of the list, during a refresh, a loader at the bottom during an "infinite" more items loading, or a retry button on the top in case of errors.
The component exposes a single sliver to the CustomScrollview .. so i should find a way to use the waterflow_flow to add items on top and bottom

Any idea?
Thanks,
Andrea

@zmtzawqlp
Copy link
Member

https://github.com/fluttercandies/loading_more_list
it seems you need this

@dna-f
Copy link
Author

dna-f commented Oct 10, 2021

Thanks, I'll give it a try

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