I could help you better if you posted a code sample of what you did, but try these few steps, and I hope they work!
1 - you should set "resizeToAvoidBottomInset" to "false" for the main scaffold widget.
it will ignore any auto-resize proccesses.
2 - use "KeyboardDismissHandler" as main wrapper for scaffold body.
its a widget that helps manage keyboard dismissal in a more controlled way.
its not built-in so you must use a library named "keyboard_dismiss_handler".
its good for preventing lags and ui issues.
3 - Sometimes using animations make smoother appear/disappear proccess and it removes lags and ui-show issues. not guaranteed but good to check.
for last tip, you could use Custom Keyboard-Aware Widget.
let me show you an example :
class KeyboardAwareView extends StatefulWidget {
final Widget child;
const KeyboardAwareView({Key? key, required this.child}) : super(key: key);
@override
_KeyboardAwareViewState createState() => _KeyboardAwareViewState();
}
class _KeyboardAwareViewState extends State<KeyboardAwareView> {
double _keyboardHeight = 0;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
_setupKeyboardListeners();
});
}
void _setupKeyboardListeners() {
// Listen for keyboard changes
}
@override
Widget build(BuildContext context) {
return AnimatedContainer(
duration: const Duration(milliseconds: 300),
padding: EdgeInsets.only(bottom: _keyboardHeight),
child: widget.child,
);
}
}
// Use like this:
Scaffold(
resizeToAvoidBottomInset: false,
body: KeyboardAwareView(
child: SingleChildScrollView(
child: YourContentWidget(),
),
),
)
// Ardavan Eskandari
Let me know if there was any problem. 💓