I have a textfield that I want to give it some changes when the keyboard closes with the close button at bottom of the phone screen.
Asked
Active
Viewed 406 times
0
-
Try wrapping you textfield inside of `WillPopScope` and use `onWillpop` and implement your changes. – ASAD HAMEED Jan 30 '21 at 13:52
1 Answers
0
You can refer to this answer.
It's a plugin which works on both android & iOS
pub: https://pub.dev/packages/keyboard_visibility
GitHub: https://github.com/adee42/flutter_keyboard_visibility
import 'package:keyboard_visibility/keyboard_visibility.dart'; @override void initState() { super.initState(); KeyboardVisibilityNotification().addNewListener( onChange: (bool visible) { print(visible); }, ); }

Harshvardhan Joshi
- 2,855
- 2
- 18
- 31