0

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.

Ardeshir ojan
  • 1,914
  • 1
  • 13
  • 36

1 Answers1

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