Closed Haidar-Hammoud closed 2 years ago
Sounds like a good idea!
This repo is open for pull requests, but not being actively developed/progressed. I'll leave this issue open for someone to see if they'd like to make a contribution to resolve it.
I found this to suit my use case. In keyboard_manager.dart replace
var bottom = MediaQuery.of(context).viewInsets.bottom;
with
final viewInsets = EdgeInsets.fromWindowPadding(
WidgetsBinding.instance!.window.viewInsets,
WidgetsBinding.instance!.window.devicePixelRatio);
var bottom = viewInsets.bottom;
Add this to the onKeyboardClose
callback
WidgetsBinding.instance?.addPostFrameCallback((_) {
if (mounted) setState(() {});
});
Love this library, this was definitely something that should have been included with flutter out of the box.
I've noticed it only works when resizeToAvoidBottomInset is false. It would be great if you could allow for the value to be true that way things stick above the keyboard as it changes its height (e.g. a chat textfield box at the bottom)