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!