Open david675566 opened 9 months ago
Could you post more information about the problem, like screenshots or a code snippet?
Hi, sorry for the late reply This is the case I'm facing: When there's exactly 1 page present, Keyboard will covered a bit spaces, slide the page a bit and release could make it 'fix' itself, but everytime open up the same page, this issue would still present: If >= 2 pages, keyboard just works as normal:
This is the ViewportConfiguration we're using:
ViewportConfiguration(
initialInset: const ViewportInset.fractional(0.9),
minFraction: 0.9,
maxFraction: 1,
),
@david675566
Thanks for the further information!
I couldn't figure out the cause of this problem for now, but I came up with a (dirty) workaround; when the user taps the input area, we can programmatically expand the page using ExprollablePageController.jumpViewportInsetTo
:
TextField(
maxLines: 1,
onTap: () {
final controller = ExprollablePageController.of(context);
// Check if the page is not fully expanded
if (controller != null && !controller.viewport.isPageExpanded) {
// Force the page to expand
controller.jumpViewportInsetTo(ViewportInset.expanded);
}
},
),
I plan to re-implement the ExprollablePageView using my other package, smooth_sheets, which I am currently developing. Once this reimplementation is complete, it should resolve the issue of the on-screen keyboard overlapping, as the mentioned package specifically addresses this problem.
I got a case where I need to use keyboard inside PageView, initialInset: const ViewportInset.fractional(0.9),
The pages are dynamically generated, at least 1 page will be build, but while there's exactly 1 page, the keyboard will covered a bit of space inside page, until I slide the page so slightly that it won't close & force rebuild itself. While if I got >= 2 pages to be build, this weird behaviour doesn't present at all, works normally.