How to create horizontal list view with faded image by Flutter? - flutter

I need a horizontal list view in the flutter , that according to the image below, the first item is empty and the image is visible in the background, when the second item starts scrolling, the background image disappears and when the item returns to its place , The image also returns to the original state.

You will need some code here.
The vertical listview you can get with the SingleChildScroolView changing the axis to vertical and placing a Column inside.
To the empty space on last item, place a Sizedbox as last widget inside Column.
Place a ScrollController on the SingleChildScroolView with a listener, and when the controller reach the maximum just fade in the background image.
Its not hard, just need some code.

Finally, I published Package (flutter_faded_list) for designing this UI on the pub.dev website.

Related

Flutter scrollable list inside overlay

My question is similar to this How to make my page scrollable when i show overlay element, that have too many items in flutter? but it has no answers so I'll try to ask as well:
I have an Overlay showing a list of questions using ListView. The list of questions is long and I need to enable scrolling inside the Overlay.
Now it's static and part of it disappears at the bottom of the mobile device.
Why is not just scrollable (since the list inside the Overlay is inside a ListView) and is there a way to make it scrollable?
Thanks in advance for any help!
UPDATE (SOLVED) :
The problem was that the ListView widget is inside a Positioned widget and the top, left, bottom and width values (in my case) need to be set in order for the content to be scrollable.
The problem was that the ListView widget is inside a Positioned widget and the top, left,bottom and width values (in my case) need to be set in order for the content to be scrollable.

create expand collapse image when scroll listview

example
I want to create some applications with widget ListView. When you scrolling up, image at first index will be expanded, and if you scroll again, next image will be expanded again, and if you scrolling down, image will be collapsed again.
Is it possible to create this with flutter?

How to keep the scrolling position when adding a new elements in the top using ListView or CustomScrollView in Flutter

Is it possible to add new elements into the top of the ListVeiw or CustomScrollView and keep the scroll position as it's with Flutter
I've tried the following
extentAfter = _scrollController.position.extentAfter;
_scrollController.jumpTo(_scrollController.position.maxScrollExtent - extentAfter);
but this won't work well with SliverAppBar - floating and its actually not optimal solution.
Actually the cleanest way would be to add those items only when user scrolls back to the top of the ListView. You can cache them in memory for the moment user is far enough from the top (in your case) of the list.

Proper way, that make a screen scrollable if the content is greater than the screen - Flutter

I am looking for the proper way, how can I use scrollable view only if necessary.
I want to create a card which will have an 500 height container. In this case some small-screen device could not show the content properly specially if the keyboard is showing.
In this case the screen should be scrollable, but I cant find a good solution.
I used a SingleChildScrollView with a Column child. Inside the column there was the Card view with the content.

android - Why does view.bringToFront() doenst work in custom Listview case?

I am making a custom listview, in that data is dynamically changing after sometime. this part and click event part of list and list's button is working fine.I have to show some specific row on the top according to text.
I am using view.bringToFront() for showing that row in front. It is not working. How can i do this?? I want if(StatusText.get(position).equalsIgnoreCase("chat request")) if i check this method then this row come to front as top row of the list.
How can I do this?
bringToFront() change the view's z order in the tree, so it's on top of other sibling views (pay attention: Z-order) In your case you should resort your data and call notifyDataChanged for your adapter
I think you can use relative layout with listview and list item layout.Make Listitem layout invisible.After calling that method just make the visiblity of that listitem layout to View.VISIBLE as you are using relative layout you can position the list item layout to top bottom center or anywer.