Questions tagged [flutter-pageview]

For questions relating to the PageView class in Flutter. When using this tag also include the more generic [flutter] tag. If your question applies to Flutter more generally, use the [flutter] tag only.

277 questions
1
vote
1 answer

How to stop manual swiping with PageView - controller.next() only?

I have a PageView which I'd like to stop a user being able to swipe on, and the only way to navigate through the pages is via PageController.next() and previous() methods. I've tried setting the PageView physics to NeverScrollableScrollPhysics() but…
d1s
  • 41
  • 4
1
vote
1 answer

Column child PageView interaction through the whole screen

I'm trying to create a screen as follows: The bottom part is PageView.builder. I want it to be interactable through the whole screen. The first thing I came up with was wrapping them in a stack, creating an invisible PageView on the top, and…
srkn
  • 35
  • 3
1
vote
1 answer

How to keep state of Flutter PageView while insert item forward?

I get some video data from backend and use PageView to show them. The video data is obtained by paging from backend.In some situations, we need to turn the page forward. So I insert video data forward and call setState() to rebuild PageView. What…
Alvin
  • 11
  • 1
1
vote
1 answer

How to save an index of PageView and load it when reopening the app?

I want to save an index of PageView and load it when reopening the app. For example, if a user closes the app on page 2, the app should be started on page 2. I tried to implement this feature by using shared_preferences and provider. However, the…
1
vote
1 answer

Flutter, The expression doesn't evaluate to a function, so it can't be invoked

I want to try Nested Scrolling ListView inside PageView future and download source code in Gitbub. But when I tried it, throw exception. Error place on final RenderBox renderBox = _listScrollController! …
ZHEN FU
  • 13
  • 2
1
vote
1 answer

Is it possible to set PageView in Flutter to be swipeable only from the edge?

I have a simple PageView widget that controls navigation between two screens/views final PageController _pageController = PageController( initialPage: 0, ); @override void dispose() { _pageController.dispose(); super.dispose(); } PageView( …
jonneroni
  • 11
  • 2
1
vote
1 answer

Flutter: Is there way to scroll pageView programmatically while user scroll another pageView?

I have two PageViews in one screen (with different viewportFraction), I need to implement the next behavior: when a user scroll PageView 2, PageView 1, also need to be scroll with PageView 2. (Like safari tabs in iOS 15) I would be very grateful for…
Alex Smith
  • 31
  • 3
1
vote
1 answer

Flutter - How to reset the current page index in PageView (after card swipe)?

I have a simple PageView.builder: @override void initState() { super.initState(); _pageController = PageController(initialPage: 0, keepPage: true, viewportFraction: 1); _pageController.addListener(() { setState(() { _activeImageIndex…
who-aditya-nawandar
  • 1,334
  • 9
  • 39
  • 89
1
vote
1 answer

Unusual bug due to keyboard in Flutter PageView

My Flutter Android app has a homepage that consists of a Scaffold with a PageView as its body. The PageView has two pages: page one some newsfeed, page two a calendar. Each page has its own custom FloatingActionButton. A ChangeNotifierProvider…
Wessel
  • 617
  • 4
  • 13
1
vote
1 answer

PageView and AnimateToPage - How to dynamically animate to Page to the scrolled position in Flutter

I have cards which are getting scrolled successfully through a Page Controller and animate to Page. Now my issue is that even though it is iterated correctly, if I scroll myself to the right or left it leaves me back at the starting position aka…
1
vote
1 answer

Flutter Widgets are moving if Keyboard appears even though resize is set to false

I have a weird behavior inside my app... I am using a PageView and on the 2nd page I am focusing a TextField on the pages init. That is working fine. However on the first page my Widgets are moving a little bit even though I set in the wrapping…
Chris
  • 1,828
  • 6
  • 40
  • 108
1
vote
1 answer

Manage multiple forms validate inside a pageview with one onpressed

I have to submit 4 forms at the same time when pressing the callback button. However, when this button is pressed, the function called with onpressed must validate that all requirements are being performed in the field validations of the…
1
vote
2 answers

How to make each doc of a Firebase collection as ListTile?

I have a code to display a list of images in a PageView with dots navigation. But for my project, I need to display several fields of the same document and this for each document of my Firebase collection. It seems that I need to put all my document…
1
vote
0 answers

Flutter change PageView page from outside the widget

In my app I have a BottomBar that handles my Pages. Right now I am simply handling it with Callbacks like this: return Scaffold( body: PageView( controller: tabController, children: [ …
Chris
  • 1,828
  • 6
  • 40
  • 108
1
vote
1 answer

How to determine the amount of text that could fit on each page(child) of PageView widget, according to screen characteristics?

I am working on mobile app that represents a gamebook. It contains episodes and each of them is built of one or more pages of text. For every episode I use PageView with children Columns(with nested Text and RichText) for each page. The screen…
MilenB
  • 11
  • 2