【问题标题】:is it possible to use our custom keyboard instead of system keyboard in flutter?是否可以在颤振中使用我们的自定义键盘而不是系统键盘?
【发布时间】:2020-09-11 22:31:35
【问题描述】:

在颤振中,我创建了我想要的自定义键盘,当用户在 Pin Put 或文本字段上的选项卡上禁用系统键盘并且用户使用自定义键盘但我无法禁用 android 键盘并在 Pin Put 中使用自定义设置文本数字键盘 有什么办法可以做到这一点吗?

【问题讨论】:

    标签: android flutter keyboard


    【解决方案1】:

    当点击 TextFields 时尝试调用该函数

    void showCustomKeyboard(BuildContext context){
      SystemChannels.textInput.invokeMethod('TextInput.hide'); //hide keyboard
      FocusScope.of(context).requestFocus(new FocusNode()); //unfocus current FocusNode
      showYourKeyBoard(); // this is your function to show your custom keyboard
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-12-21
      • 2018-09-19
      • 2020-06-05
      • 2022-01-27
      • 1970-01-01
      • 2020-12-18
      • 1970-01-01
      相关资源
      最近更新 更多