Questions tagged [flutter-sliver]

A Sliver is a portion of a scrollable area that animate on scroll events, like stick to the top or expand when pulled to the bottom. You can use slivers to achieve custom scrolling effects. Flutter has a few Sliver implementations out of the box, such as SliverList, SliverGrid and SliverAppBar.

A Sliver is a portion of a scrollable area that animate on scroll events, like stick to the top or expand when pulled to the bottom.

Flutter has a few Sliver implementations out of the box, such as:

Check this page on the docs for general Sliver information in flutter.

460 questions
0
votes
0 answers

How can I achieve animated app bar with tab bar(defaultTabController) sticky under it when scrolling down?

I want to show a transparent background appbar with (extendBodyBehindAppBar:true) initially. When I'm scrolling, the appbar should get background color and I have defaultTabController inside the body, the Tab Bar should get sticky under the appbar…
laxminarayan1998
  • 838
  • 8
  • 13
0
votes
1 answer

How to prevent viewport offset of CustomScrollView when delete items?

I am implementing a chat and there is a problem when items removes from list. If I delete several items from bottom of the CustomScrollView, the scroll position offsets up depending on sum of height of deleting items. How can I prevent it? import…
Aleksey
  • 15
  • 5
0
votes
4 answers

How to make persistent AppBar and floating widget just below AppBar in flutter

I want to make my AppBar persistent (it should not float like tabbar) while I want to place a widget or say tabbar just below appbar which will float and be pinned to appbar just like spotify app of library page see below for proper…
0
votes
1 answer

how to add new element to Slivers Flutter with changing the UI?

i need once the user click on send button. the text input field which he had add will be added to a list to be displayed inside the ListView. but the listView does NOT render the new element of the list. no change happen when the user click the send…
user16906111
0
votes
1 answer

Flutter- How can I add Title to SliverList's SliverChildBuilderDelegate?

I want to achieve a design similar to the below image. I have used SliverList with CustomScrollView. Now, How can I add a title to the SliverList? There are multiple horizontal and vertical scroll views therefore I am using CustomScrollView to…
Ranjit Shrestha
  • 622
  • 6
  • 24
0
votes
1 answer

What is the purpose of property semanticIndexCallback in SliverChildBuilderDelegate and SliverChildListDelegate?

In the documentation, it is stated as: A callback which produces a semantic index given a widget and the local index. The statement from the documentation itself is hard to understand, so I am here for a help.
The Chinky Sight
  • 349
  • 4
  • 19
0
votes
1 answer

The argument type 'num' can't be assigned to the parameter type 'double?'. SliverAppBar

I am trying to set expanded height according to image from URL. I implemented a Future function. Future _calculateImageRatio(String url) async { double ratioX = 0.0; Completer completer = Completer(); Image image =…
gurkan stack
  • 413
  • 1
  • 15
  • 43
0
votes
1 answer

Flutter SliverGrid Flip Axis

tl;dr How do I flip the X axis in a SliverGrid? I have to display a long list in a grid (every cell is equal in size). I can request the list from a server with pagination. Now the user should be able to open that list at any index in the grid and…
s0me1
  • 109
  • 7
0
votes
1 answer

How to select specific radio button and get its value in ListView.builder Flutter

I would like to create a list of data that is called JSON with radio button. However, when I select any of the radio buttons it is selecting each and every radio button rather than selecting one. And, how can I get the selected radio button's value…
Smile
  • 35
  • 7
0
votes
1 answer

A RenderShrinkWrappingViewport expected a child of type RenderSliver but received a child of type RenderFlex

i am new in flutter and firebase integration. i am trying to build mobile app that connect to firestore. i am trying to use paginate firestore in my mobile app. But i got error message that said "A RenderShrinkWrappingViewport expected a child of…
ryan chandra
  • 321
  • 3
  • 11
0
votes
2 answers

Sliver App Bar not displaying correctly - Flutter

I'm trying to display a SliverAppBar as shown on my design but I'm not sure it can be done in Flutter here is my code so far SliverAppBar( // title: , backgroundColor: Colors.grey[200], expandedHeight: 300, …
Sunshine
  • 372
  • 2
  • 21
0
votes
0 answers

Flutter. Is it possible somehow decorate SliverList/SliverGrid?

I need to make a scrollable for all content for partiular page, but the problem is that I need to have dynamic list at the middle, which grows. So I use CustomScrollView. From top to bottom at slivers[] I have SliverToBoxAdapter decorated as I need,…
Parafin
  • 89
  • 3
  • 7
0
votes
1 answer

how to make a widget to be on the bottom of the screen if using SliverStack?

as you can see at the image above, I have a red container stick on the top (right below the app bar). here is the code I use CustomScrollView( slivers: [ SliverAppBar(), _buildStack(), ] ), Widget…
Alexa289
  • 8,089
  • 10
  • 74
  • 178
0
votes
1 answer

How to minimize SliverList by clicking button in SliverAppbar flutter

How can I minimize Sliver list automatically by clicking on button in SliverAppBar I have minimize button in SliverAppbar, and SliverList with multiple ListTiles. I want to minimize animatedly all list item by clicking on this minimize button here…
Mudasir Habib
  • 704
  • 7
  • 14
0
votes
1 answer

Flutter: Display SliverList in "shaped" out area of SliverPersistentHeader

I have a CustomScrollView which holds a SliverPersistentHeader as well as a SliverList. I apply some ShapeBorder to the Widget returned within the SliverPersistentHeaderDelegate. I would now like my "underneath" placed SliverList to use some of…
Jonathan Rhein
  • 1,616
  • 3
  • 23
  • 47