In my Flutter app, I would like to be able to know whether the device has a soft keyboard enabled (notice: enabled != currently showing). What I mean by that is, when a text input receives focus, will a soft keyboard be shown?
The idea is that when showing a dialog with a text field for a query and a list of search results (the list is populated even if the query is empty), I would like to autofocus the text field, but only if by focusing it there won't be a soft keyboard popping up. The issue is that soft keyboards take away screen space, so there will be fewer search results visible (on small phones, as few as only one). Therefore, autofocusing should only happen when there won't be a soft keyboard (as, for example, with browsers on desktop).
Edit: To clarify, this is not a duplicate of Flutter: Detect keyboard open/close or similar questions. What this question asks is "Is the soft keyboard currently showing?" whereas my question is "When a text input receives focus, will a soft keyboard be shown?" I need to know whether it will show before it is actually shown.
Related
I am having a problem with soft keyboard in flutter. My keyboard input type is number. whenever i open the soft keyboard, lock phone and then unlock phone, the number type keyboard changes to alpha numeric though i cannot type in the text field.
Could somebody please help me?
https://repo.ekbana.info/codefirm/raven/raven-pm/uploads/a31f5a5f66c27507aa521eadd0cd46c2/screen-20221219-165145.mp4
I know most of the people have problems with keyboard and want it to go away, but I'm interested in it showing up. Basically, I want to trigger the keyboard show-up when I tap an element and then get the text I typed via RawKeyboard. Is there a way I can trigger the keyboard to show in Flutter? So far I understood you can do that only when you have a TextField.
Many thanks.
Im trying to retrieve typing information such as the on-screen coordinates of where a user presses a key on a keyboard on Android and iOS using flutter similar to how swiftkey does it to generate their heatmaps.
How would I go about doing this? Do I have to create my own custom keyboard
I've tried to implement the suggestion here: How to Calculate the Coordinates of touch in Flutter?
But once the keyboard drawer pops up, the on-screen coordinates do not register.
To do this you would have to show your own keyboard that you build in flutter. The reason for this is that the keyboard which pops up is actually a different android window (or at least activity, but pretty sure window and likely process as well), that is shown over top of the window that flutter is rendering into. By design, the keypresses can't be recorded as that would be a security issue (the active app is one thing, but imagine if another app could record keypresses or even location of taps - they could steal your passwords!).
There may be some android-specific way of doing it that I'm not aware of, but it probably won't work on all devices and all keyboards and is likely not a good route to follow.
I want both EditTexts showed above the soft keyboard if the upper one selected and input, the below one can show according to the changes in the upper one without covered by soft keyboard
Set the android:windowSoftInputMode to adjustResize, so your app is resized above the keyboard rather than covered.
So, I got the following image from graphic designer.
On the right is keyboard popping in our application, on the left is keyboard he sees everywhere else on his phone (iPhone 6), apparently. He wants the keyboard on the left to appear in our application too. This looks like standard iOS keyboard, only smaller, but I don't see any option to get it. How do I get it? Or is it just particularly popular custom keyboard/extension? Or maybe it's really easy to do custom keyboard/extension (note, I don't know a thing about custom keyboards/extensions in iOS)?
The keyboard is adjusted when you have inputAccessoryView assigned for active field.
check: https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/InputViews/InputViews.html