mardi 29 octobre 2019

How can I get the on screen keyboard for flutter web apps running on a touch screen

I am building flutter for the web, and I want to use it on a touch screen. My app runs great and takes input from the mouse, but when I want to use a text input field the app works with the physical keyboard that I have attached since I'm running in chrome on my Macbook. I would like to use this web app on a touch screen kiosk type of setup though so I wanted to always bring up the virtual (on screen) keyboard for text entry.

I tried:

  @override
  void initState() {
    SystemChannels.textInput.invokeMethod('TextInput.show');
    super.initState();
  }

And this does force open the virtual keyboard if I run on a virtual tablet for example, but didn't work for me when I ran the exact same flutter app in chrome.

I'm running with v1.9.1+hotfix.3-pre.1, on Mac OS X 10.14.6 18G103

Does Anyone know a way to force flutter to always use virtual on screen keyboard?




Aucun commentaire:

Enregistrer un commentaire