import 'package:flutter/cupertino.dart';

class KeyBoardUtil {

  /// 隐藏软键盘
  static hideKeyboard(BuildContext context) {
    FocusScopeNode node = FocusScope.of(context);
    if (!node.hasPrimaryFocus && node.focusedChild != null) {
      FocusManager.instance.primaryFocus?.unfocus();
    }
  }
}
