add bottom intent to keyboard size

This commit is contained in:
Fabian Freund
2026-04-28 13:40:01 +02:00
parent af426bc9b0
commit 6e3b782d4e
@@ -404,6 +404,8 @@ class BrowserScreen extends HookConsumerWidget {
// Get pixel ratio for converting logical pixels to physical pixels
final pixelRatio = MediaQuery.of(context).devicePixelRatio;
final bottomSystemInsetPx =
(MediaQuery.viewPaddingOf(context).bottom * pixelRatio).round();
// Watch find-in-page visibility for the selected tab
final findInPageVisible =
@@ -450,9 +452,11 @@ class BrowserScreen extends HookConsumerWidget {
viewportService.keyboardEvents,
onData: (event) {
if (!event.isAnimating) {
final nextKeyboardHeight = event.isVisible ? event.heightPx : null;
if (keyboardHeightPx.value != nextKeyboardHeight) {
keyboardHeightPx.value = nextKeyboardHeight;
final nextKeyboardHeightPx = event.isVisible
? event.heightPx + bottomSystemInsetPx
: null;
if (keyboardHeightPx.value != nextKeyboardHeightPx) {
keyboardHeightPx.value = nextKeyboardHeightPx;
}
}
},