I am running my flutter app on a Debian with Openbox (X11).
When i touch a TextField
, the keyboard doesn’t appear.
I have tried to request the focus
and set the autofocus: true
on the TextField
but it doesn’t work either.
It works fine on my iOS / Android devices.
Is this supported by flutter for X11 backends ?
Should i install some keyboard package on my Debian so flutter can use it ?
Thanks in advance !
2
Answers
I think I get what you’re trying to achieve. Unfortunately I think there is no easy way out. In my flutter linux projects I used my own on screen keyboard with it’s own controller written from 0. You could try to extend (material) keyboard behaviour in your app and set inputdevices to touch and not keyboard maybe that will force flutter’s keyboard to pop up. But other than that custom keyboard would be your best bet.
I don’t think pushing for system keyboard would do much in that case. Even in terms of app optimisation. But that’s another possible solution. In my case it’s simply when textfield focusNode has focus there’s a function pushing my custom keyboard on screen no matter what as a layer on top of what is currently on screen. That way it does not collide with currently displayed view.
It can be a basic class with some material functionality on it like inkwell effects on keytaps added manually. It’s really bare bones in my case.
You can use "new_virtual_keyboard" package, this worked for me in a raspbian os.
Edit
Here is a list of the other packages