onWillPop method Null safety
Implementation
Future<bool> onWillPop() async {
FocusScope.of(context).requestFocus(new FocusNode());
FocusScope.of(context).unfocus();
if (popupKey.currentState?.closePopup() == true) {
return Future.value(true);
} else {
return Future.value(false);
}
}