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
20
votes
2 answers

Flutter how to scroll to a specific item position in SliverList?

I have a SliverList with SliverChildBuilderDelegate, my problem is that I cannot set ScrollController to SliverList because I want to control scrolling of my List, I am looking for scrolling to specific item in the list(which is very large) and in…
aym1781969
  • 545
  • 1
  • 4
  • 16
19
votes
2 answers

How to fade in/out a widget from SliverAppBar while scrolling?

I want to 'fade in' and 'fade out' a widget from SliverAppBar when user scrolls on the screen. This is an example of what I want to do: Here is my code without 'fading': https://gist.github.com/nesscx/721cd823350848e3d594ba95df68a7fa import…
nesscx
  • 191
  • 2
  • 4
18
votes
6 answers

How to get the SliverPersistentHeader to "overgrow"

I'm using a SliverPersistentHeader in my CustomScrollView to have a persistent header that shrinks and grows when the user scrolls, but when it reaches its maximum size it feels a bit stiff since it doesn't "overgrow". Here is a video of the…
enyo
  • 16,269
  • 9
  • 56
  • 73
18
votes
4 answers

How to change the background color of a button dynamically in onPressed()

I have a list of Raised buttons, I want the background color of the selected button to change in its onPressed() I tried changing the color in setState but it doesn't do anything. This is the function that generates the list of Buttons List
Ghada Shebl
  • 539
  • 2
  • 6
  • 12
17
votes
3 answers

Align a flutter PageView to the screen left

I want to render cards with a horizontal paged scroll and be able to see the borders of the previous and next card every time one is visible. The flutter PageView widget produces almost the result I want, but it doesn't show the pages aligned the…
Rolando Urquiza
  • 1,404
  • 3
  • 17
  • 29
17
votes
1 answer

Putting Widget above a ListView in Flutter

The below code is working fine with me for calling and displaying data from firestore: return ListView( padding: const EdgeInsets.only(top: 20.0), children: snapshot.map((data) => _buildListItem(context, data)).toList(), ); But If I tried to put…
Hasan A Yousef
  • 22,789
  • 24
  • 132
  • 203
17
votes
3 answers

How to create a bounded scrollable TabBarView

I need to implement the following layout in Flutter. When the user scrolls, I want the entire layout to scroll (hiding the header and tab bar). However, I can't nest a TabBarView inside a ListView since the TabBarView doesn't have a bounded height…
Ozymas
  • 427
  • 1
  • 5
  • 12
17
votes
6 answers

Flutter: Change text when FlexibleSpaceBar is collapsed

I have looked through the Flutter documentation to try and find an event, callback or even a state that I could hook into when the FlexibleSpaceBar is collapsed or expanded. return new FlexibleSpaceBar( title: new Column( crossAxisAlignment:…
Jakes
  • 369
  • 1
  • 3
  • 8
16
votes
2 answers

How to show scrollbar in SliverList?

I'm using SliverAppBar and SliverList as main containers in my app. When I try to wrap SliverList in Scrollbar widget, I get an error, and when I wrap whole CustomScrollView in Scrollbar, it overlaps SliverAppBar. So how can I show scrollbar…
emvaized
  • 884
  • 12
  • 23
15
votes
1 answer

How Use SliverPersistentHeader and TabBarView Together in Flutter?

I have Main Page With SliverPersistentHeader and TabBarView Like Below code : @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Theme.of(context).backgroundColor, body: DefaultTabController( …
Sana Ebadi
  • 6,656
  • 2
  • 44
  • 44
15
votes
2 answers

Flutter GridView with Header

How to create the grid view with scrollable toolbar in FLUTTER. I have found the list view with header ListViewWithHeader. But I need the GridView with header like in the mentioned image below.I have used SilverGrid ignorer to build this layout,…
jazzbpn
  • 6,441
  • 16
  • 63
  • 99
15
votes
3 answers

Flutter tabsView and NestedScrollView scroll issue

I have a "NestedScrollView" that contains multiple "TabView" widgets and each one of those tabs has a list builder. The problem is that when i scroll through one list in a specific tab, the scroll position affects all the other lists in the other…
abdalmonem
  • 1,367
  • 1
  • 10
  • 19
13
votes
9 answers

How to Give BorderRadius to SliverList

I am using SliverAppBar and SliverListView in my project. I need BorderRadius to my SliverList that is coming bottom of my SliverAppBar. Here is screenshot what I need : And here is my code: Scaffold( body: CustomScrollView( slivers:…
black-hacker
  • 223
  • 4
  • 12
13
votes
3 answers

WebView CustomScrollView + Floating AppBar

I am trying to create a screen that has a WebView (from webview_flutter: ^0.3.5+3) and an AppBar that I want to scroll offscreen on user scroll. I stumbled upon this guide and tried implementing something similar, but no dice. Is there a way to use…
user3403083
  • 131
  • 1
  • 4
12
votes
1 answer

Flutter CustomScrollView slivers stacking

I am trying to create a scrollView using CustomScrollView. The effect that I need, is very similar to this one. I need the SliverList to be stacked above the SliverAppbar, without the list taking the whole screen and hiding the SliverAppbar. The…
Omar Awamry
  • 1,462
  • 3
  • 15
  • 29
1
2
3
30 31