Questions tagged [scrollcontroller]

55 questions
0
votes
1 answer

Getting scroll index from scrolling position in pixels listview flutter

Is there a way we can use ScrollController.position.pixels to know the scrolling index of a listview in flutter? I'm trying to restore the last scrolling index between app restarts.
Noor
  • 193
  • 1
  • 2
  • 15
0
votes
0 answers

Change scrollView offset without callback listener

I want to change scrollView's offset with code so I use ScrollController: ScrollController _controller; _controller.addListener(() { print('call listener'); }); My way to change offset: _controller.jumpTo(200); it will callback listener…
无夜之星辰
  • 5,426
  • 4
  • 25
  • 48
0
votes
2 answers

Gridview.builder start at the end of list

I have a Gridview.builder in a Widget. When I open the widget I would like to jump immediately to the end of the Grid List. class _StampsInTravelbookState extends State { ScrollController _scrollController = new…
JoergP
  • 1,349
  • 2
  • 13
  • 28
0
votes
1 answer

Flutter handle scroll actions (PrimaryScrollController reverse listview)

On iOS, tapping the status bar makes PrimaryScrollController go to the top: https://flutter.dev/docs/resources/platform-adaptations#return-to-top On iOS, tapping the OS status bar scrolls the primary scroll controller to the top position. There is…
Braden Bagby
  • 273
  • 1
  • 8
0
votes
1 answer

Flutter StaggeredGridView.countBuilder scrollcontroll. I am having this error( type 'String' is not a subtype of type 'int' of 'index')

I am having problem when I used the scrollcontroller to controll the gridview. I am having the error ( type 'String' is not a subtype of type 'int' of 'index'). But it was perfectly working before using the scrollcontroller. I don't where i need to…
0
votes
3 answers

ScrollController jumpto when ListView.builder complete

I am creating a chat with firebase in flutter and I want that when the listview builder completes it can go to the end of the list (Last message). This is what my buildmethod looks like: return Scaffold( backgroundColor: Color(0xFFf1e4e8), …
0
votes
1 answer

ScrollController jumpTo specified value doesn't work Flutter

In my app I decided to show a ScrollBar so as the same ScrollController is needed both in the ScrollBar and the ListView I had to change my ScrollablePositionedList.builder to a ListView.builder. First in my List homePageItems is a PageView…
Vincenzo
  • 5,304
  • 5
  • 38
  • 96
0
votes
1 answer

An efficient way in Flutter to change appbar color when scrolled

I have been working on the Scroll of the page, and at the same time, doing these things: Changing color of the AppBar background when scrolling Changing the AppBar background to transparent when scrolled to the top My code works fine, but the…
Alok
  • 8,452
  • 13
  • 55
  • 93
-1
votes
2 answers

Why is Flutter's ScrollController's listener callback sometimes executed before setState?

I am developing using Flutter. I encountered some unexpected behavior with widget rebuilds and ScrollControllers. Below is the program that reproduces the issue. In my understanding, I thought that widget rebuilds due to state changes are performed…
mmm
  • 3
  • 2
-1
votes
3 answers

Flutter - show how many items scrolled in gridview

i am trying to implement like the below image. I have a grid view which has 2 columns in which i am displaying my list. As you can see in the above image it is showing 175/67 products. my logic is i am giving my grid view a scroll controller. I am…
Manish Shah
  • 17
  • 2
  • 8
1 2 3
4