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

MultiCrossAxisSliver #45

Open
doppio opened this issue Apr 9, 2022 · 3 comments
Open

MultiCrossAxisSliver #45

doppio opened this issue Apr 9, 2022 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@doppio
Copy link

doppio commented Apr 9, 2022

Hey, thanks for this great package!

I have a vertically scrolling MultiSliver. In wide layouts, I want two of the slivers in the MultiSliver to be arranged horizontally. I initially added them as a standard Row(), but that won't work since each child is a sliver. Is there already a way to do that with this package? If not, would there be any interest in adding something like "SliverRow"/"SliverFlex"? Or maybe something like "CrossAxisMultiSliver"?

@Kavantix
Copy link
Owner

Hey @doppio sorry for the late response.

I did already have MultiCrossAxisSliver on the roadmap but haven't had time to implement or flesh out the idea.

A major open question for me would be, how do we determine the cross axis size of the widget since slivers assume to take op the whole cross axis.

If you have any ideas or interest in making a PR let me know!

@Kavantix Kavantix changed the title SliverFlex MultiCrossAxisSliver Apr 27, 2022
@Kavantix Kavantix added enhancement New feature or request help wanted Extra attention is needed labels Apr 27, 2022
@Kavantix Kavantix added this to To do in sliver_tools via automation Apr 27, 2022
@aloisdeniel
Copy link

aloisdeniel commented Oct 5, 2022

We could have a CrossAxisFlexibleSliver with a flex property which indicates how much space it should take along the cross axis (just like Flexible for Flex).

If a child sliver must fill the cross axis space then a child could simply have a default flex value of 1 if not precised by a CrossAxisFlexibleSliver.

@flogaribal
Copy link

Hi!

First thanks @Kavantix for your work!
I am trying to create SliverStack containing an horizontal SingleChildScrollView and a vertical CustomScrollView.

SliverStack(
  positionedAlignment: Alignment.topCenter,
  children: [
    CustomScrollView(...),
    SliverPositioned(
      top: 10,
      child: SingleChildScrollView(
        scrollDirection: Axis.horizontal,
        child: Row(
          children: [...],
        )
      ),
  ],
);

My problem is that horizontal scrolling is not working (i.e scrolling) anymore when using the SliverStack.
It is like my Gesture is absorbed by the widget below/under and only the vertical scroll is handled.
I tried to put my SingleChildScrollView in a basic SliverToBoxAdapter before the SliverStack, and it works perfectly...

I do not know if it is an expected (not supported yet) behavior or if I am doing something wrong.
Does anyone has any hint/tips or tricks?

Thanks ! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: To do
sliver_tools
  
To do
Development

No branches or pull requests

4 participants