When building UI in Flutter, sometimes we need to get keyboard height to update the UI accordingly. In this post, I will share with you a simple method to get soft keyboard height using MediaQuery.
double getKeyboardHeight(BuildContext context) {
return MediaQuery.of(context).viewInsets.bottom;
}
Just that!
Creator of Coflutter.
Founder & CTO at Bumbii Technology
Founder at Bumbii K12
Follow him on Twitter, Github, StackOverflow, LinkedIn, Upwork.