Currently, I know the method of hiding the soft keyboard using this code, by onTap methods of any widget.
onTap
FocusScope.of(context).requestFocus(new
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { currentFocus.unfocus(); }
You should check here https://flutterigniter.com/dismiss-keyboard-form-lose-focus/