openKeyboard static method

dynamic openKeyboard()

Implementation

static openKeyboard() {
  if (_root!.hasKeyboard && _pageKey != null) return;
  _pageKey = GlobalKey<KeyboardPageState>();
  var tempKey = _pageKey;
  var isUpdate = false;
  _root!.setKeyboard((ctx) {
    if (_currentKeyboard != null) {
      if (!isUpdate) {
        isUpdate = true;
      }
      return KeyboardPage(
          key: tempKey,
          point: _keyboardPoint!,
          builder: (ctx) {
            return _currentKeyboard?.builder(
                ctx, _keyboardController!, _keyboardParam);
          });
    } else {
      return Container();
    }
  });

  BackButtonInterceptor.add((_, __) {
    Keyboard.sendPerformAction(TextInputAction.done);
    return true;
  }, zIndex: 1, name: 'CustomKeyboard');
}