add bottom intent to keyboard size
This commit is contained in:
+7
-3
@@ -404,6 +404,8 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
// Get pixel ratio for converting logical pixels to physical pixels
|
// Get pixel ratio for converting logical pixels to physical pixels
|
||||||
final pixelRatio = MediaQuery.of(context).devicePixelRatio;
|
final pixelRatio = MediaQuery.of(context).devicePixelRatio;
|
||||||
|
final bottomSystemInsetPx =
|
||||||
|
(MediaQuery.viewPaddingOf(context).bottom * pixelRatio).round();
|
||||||
|
|
||||||
// Watch find-in-page visibility for the selected tab
|
// Watch find-in-page visibility for the selected tab
|
||||||
final findInPageVisible =
|
final findInPageVisible =
|
||||||
@@ -450,9 +452,11 @@ class BrowserScreen extends HookConsumerWidget {
|
|||||||
viewportService.keyboardEvents,
|
viewportService.keyboardEvents,
|
||||||
onData: (event) {
|
onData: (event) {
|
||||||
if (!event.isAnimating) {
|
if (!event.isAnimating) {
|
||||||
final nextKeyboardHeight = event.isVisible ? event.heightPx : null;
|
final nextKeyboardHeightPx = event.isVisible
|
||||||
if (keyboardHeightPx.value != nextKeyboardHeight) {
|
? event.heightPx + bottomSystemInsetPx
|
||||||
keyboardHeightPx.value = nextKeyboardHeight;
|
: null;
|
||||||
|
if (keyboardHeightPx.value != nextKeyboardHeightPx) {
|
||||||
|
keyboardHeightPx.value = nextKeyboardHeightPx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user