Open NerdFaisal404 opened 2 years ago
I have the same issue. This given height of the keyboard is obviously incorrect.
On Android, I get actually 218, but I expect 249, which is the value of
EdgeInsets.fromWindowPadding(WidgetsBinding.instance!.window.viewInsets,WidgetsBinding.instance!.window.devicePixelRatio).bottom
I'm getting wrong keyboard height on: Xiaomi MI 9T Pro Redmi Note 6 Pro Five other Android models I was able to test are fine.
Okay, I found a solution. My solution above will only work on Android 10 and below, so do not use it.
To make the keyboard height of this package work I use this:
willShowKeyboard: (double keyboardHeight) {
if(Platform.isAndroid){
keyboardHeight += WidgetsBinding.instance!.window.viewPadding.top / WidgetsBinding.instance!.window.devicePixelRatio;
}
print('keyboard height: $keyboardHeight');
}
Hope that helps anybody.
My keyboard works well only on debug mode. I don't get what happens on release versions of the app
Devices tested on: Oppo A3S, Android 8.1 ARM64 Samsung A10S, Android 11
I am not getting keyboard height properly.