Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Keyboard height problem #45

Open
NerdFaisal404 opened this issue Oct 18, 2021 · 5 comments
Open

Keyboard height problem #45

NerdFaisal404 opened this issue Oct 18, 2021 · 5 comments

Comments

@NerdFaisal404
Copy link

I am not getting keyboard height properly.

@LostInDarkMath
Copy link

I have the same issue. This given height of the keyboard is obviously incorrect.

@LostInDarkMath
Copy link

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

@MagTuxGit
Copy link

MagTuxGit commented Apr 26, 2022

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.

@LostInDarkMath
Copy link

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.

@root458
Copy link

root458 commented Jul 1, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants