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
28
votes
3 answers

How do I set the initial page of PageView in Flutter?

I have a PageView with four pages in it. I want to start on the third page. That means there are two pages available when the user scrolls up and one page when the user scrolls down. I tried: home: PageView( controller: MyPageController(), …
Christian
  • 25,249
  • 40
  • 134
  • 225
18
votes
4 answers

Flutter PageView not swipeable on web (desktop mode)

I'm new to flutter. I implemented flutter PageView with the help of its documents: /// Flutter code sample for PageView // Here is an example of [PageView]. It creates a centered [Text] in each of the three pages // which scroll…
amir_a14
  • 1,478
  • 10
  • 15
17
votes
7 answers

Flutter : PageController.page cannot be accessed before a PageView is built with it

How to solve the exception - Unhandled Exception: 'package:flutter/src/widgets/page_view.dart': Failed assertion: line 179 pos 7: 'positions.isNotEmpty': PageController.page cannot be accessed before a PageView is built with it. Note:- I used it in…
Rakesh Shriwas
  • 611
  • 2
  • 7
  • 15
11
votes
4 answers

implementing custom scrolling like Chanel app in flutter?

Recently I installed a new app called Chanel Fashion, on it's home page there is a very strange type of scrolling, which you can see it from below GIF, I highly doubt it's a customized scroller of anytype, I think it's a pageview, any hints on how…
Shaheen Zahedi
  • 1,216
  • 3
  • 15
  • 40
7
votes
2 answers

Is it correct to have nested Scaffold in Flutter?

I have a PageView in my app homepage and I want: The AppBar changes according to the page The BottomAppBar is fixed The 2 solutions I imagined are: The hard one: have one Scaffold with appBar, body and bottomNavigationBar; use the PageView's…
Galactose
  • 175
  • 3
  • 8
7
votes
4 answers

Flutter Web "smooth scrolling" on WheelEvent within a PageView

With the code below import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { const MyApp({Key key}) : super(key: key); @override Widget build(BuildContext context) => MaterialApp( …
7
votes
2 answers

Flutter Hero-like transition in PageView

I have an image in one page of the PageView. I want to animate this image to the next page when i go to it, sort of like when you use Hero animations in navigator page transitions. Any ideas how this can be achieved?
6
votes
1 answer

Flutter Performance Issue/Jank with video_player in PageView

I've been struggling with severe janks with the "official" flutter video_player package in combination with the PageView widget. My Goal Scroll smoothly and quickly through several pages of a PageView widget, that contain a Video widget each. Actual…
6
votes
1 answer

InteractiveViewer inside PageView

I'm creating a PageView with a list of images, and I want to add interactiveViewer to each image so it can be resized to view details. here is what I wrote: PageView.builder( dragStartBehavior: DragStartBehavior.start, …
祝望舒
  • 61
  • 4
6
votes
2 answers

flutter music keeps playing when I stop playing song with function and change navigation bar index

I have a list containing music on each item. If I close the screen im changing the index of the currently located BottomNavigationPage and calling the stop function for stopping the audio, but exactly this doesnt work sometimes. If the song is in…
Marcel Dz
  • 2,321
  • 4
  • 14
  • 49
5
votes
2 answers

Flutter make Perspective Page View infinite loop

I implemented a perspective_page_view like this. I updated the code to the new Flutter Version and everything is working fine. The thing is that I would like that PageView to have an infinite loop. I tried multiple different solutions I found on…
Chris
  • 1,828
  • 6
  • 40
  • 108
5
votes
0 answers

Flutter PageView is crashing if pushReplaceNamed

I have a NavBar which I control via a Provider : class BottomNavBarProvider extends ChangeNotifier { final PageController navigationController = PageController(initialPage: 0); int selectedTabIndex = 0; BottomNavBarProvider() {} void…
Chris
  • 1,828
  • 6
  • 40
  • 108
5
votes
0 answers

Flutter: How to left align View Port in PageView

How it works When we set viewportFraction, the view gets center aligned. If viewportFraction sets PageView( viewportFraction: 0.8 ) Center-Aligned view port How I expect But what I need is the view to start with left-aligned like how playstore…
Vivek
  • 113
  • 1
  • 12
5
votes
0 answers

Flutter: How to embed multiple horizontally Webviews in PageView

I am prototyping an Epub reader in Flutter. Each chapter is displayed in a WebView and these WebViews are placed inside a PageView. The contents of each WebView is paginated thanks to a multi-column layout: 1 column = 1 visible page. During a…
SurfinJim
  • 51
  • 4
4
votes
2 answers

How to use PageView builder to view items based on my List?

I am using PageView builder in my flutter app to display scrollable cards. For that I have first created a widget _buildCarousel and widget _buildCarouselItem to display it using my defined by defined widget for card. I have also defined a List of…
enggPS
  • 686
  • 1
  • 7
  • 23
1
2 3
18 19