hideKeyboard method

void hideKeyboard()

隐藏输入法

Implementation

void hideKeyboard() {
  try {
    if (context?.mounted == true) {
      FocusScope.of(context!).unfocus();
    }
  } catch (e) {
    print(e);
  }
}