How to prevent Textfield scrolling when text is longer then screen height the problem is that I have CustomScrollView inside of it horizontal ListView and textfield and I want that when you scroll text inside textfield it would scroll with ListView now it scrolls just text and leaves ListView pinned to the place, but if you scroll while tapping outside textfield it works as expected.
Seems that nested scrollview would solve such problem but no idea how to implement it with two child widgets
You can use a NestedScrollView and a controller and then ListView will work.
Related
I have a CustomScrollView with several slivers and a floating sliver app bar at the top. I'd like to be able to tap the app bar and have it expand vertically over the slivers below. Currently expanding the panel pushes the subsequent slivers down instead of expanding over them.
How to make a NestedScrollView so that until the ListView (located in the body) scrolls up to the end, the headerSliverBuilder does not start displaying.
how to keep a specific container of a ListView on the top of the screen when scrolling down?
for example:
appBar
image1(inside the listview)
tabs(should stay below appBar but image1 disappears when scrolling down)
list item 1
list item 2
....
navBar
You have to work with SliverList and SliverAppBar to achieve a layout like that.
Read more about it in this article.
i wanna shrink [ Description section ] when user scroll down.
like sliver appbar but reversed.
i expected to find flutter widget like sliver bottombar and i disappointed.
I want to Make Container() shrink when user scroll down the screen
and scroll up starting position make Container() expanded as first time.
How can i do this??
You could use AnimatedContainer https://flutter.dev/docs/cookbook/animation/animated-container (doc)
Also, you must use ScrollController https://api.flutter.dev/flutter/widgets/ScrollController-class.html (doc).
To listen for the scroll event, and each time when a user scrolls down/up maybe in some cases left/right, you will recalculate the height of your AnimatedContainer, and set a new state.
I am trying to make a design similar to this Scroll Effect
Any ideas on how to do this?
What I tried (failed): Vertical scrolling pageview where the middle child is a SingleChildScrollview. But the SingleChildScrollview stops the vertical pageview from working.
I tried adding a scroll controller to the Scrollview in the PageView, and animatedJumpToPage when I reached the bottom of the scrollview, but this has an ugly effect and theres gotta be a better way to do this
Try using a ListView widget. It easily allows you to have a vertical scroll mechanism without adding any controllers or anything complicated.