I have two Pages inside a vertical PageView.
PageView(
controller: pageController,
scrollDirection: Axis.vertical,
children: [
PageA(),
PageB(),
],
)
The lower page (B) contains the following:
Column
Row
...
Expanded
ListView
Card
Container
Row
...
Flexible
Padding
TextFormField
The problem occurs whenever I focus and unfocus the TextFormField.
Expetation: The Keyboard pops up and the Expanded ListView shrinks, so that the TextFormField is above the Keyboard. When the Keyboard is dismissed, the ListView should expand and the page should look as before.
What happens instead: When the Keyboard is dissmissed, the ListView expands back to its original size but the Page (B) stays offset above where the keyboard was and doesn't move back down. The end result is, that the page (B) is offset upwards ind thus partially offscreen and I have to scroll it manually back down.
The page B itself has a fixed size and once scrolled back down, it can't be offset upwards manually.
TL;DR: PageView pushes page partially off screen after dismissing keyboard.
Any help is apreciated and thanks in advance :D
Edit: Added Screenshot: Before, while and after editing the text field
Edit 2: I think it has something to do with the pageview itself and its scroll physics.