I have only been programming with Flutter for one and a half months and am still quite inexperienced.
But I have a question that I couldn’t find an answer to on the Internet.
I need an app that mainly consists of a PageView. Unfortunately, with a PageView, all pages are always the same size.
Is there any way to make the width of one page smaller or make the viewport fraction smaller for one page than for other pages?
PageView.Custom may help us, but I haven’t been able to find out whether PageView.Custom has this function or not. I tried to read me cleverly on the Internet, but couldn’t find anything.
If Pageview doesn’t work, you have an alternative idea which widget I could use. My pageview has only two pages, but I need both the swipe function and the function “animatetopage …”
I have successfully solved the problem.
Now to my solution. I have built a second PageController that has a ViewPortFraction of 0.8. As soon as the second page is opened to 30%, the first controller is replaced by the second PageController and the second page is getting smaller.
Answered By – Lars Henning
Answer Checked By – Clifford M. (FlutterFixes Volunteer)