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
This is best
Scaffold( body: GestureDetector( onTap: () { if (messageFocusNode.hasFocus) { messageFocusNode.unfocus(); } }, child: new Container( //rest of your code write here ) )