Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to hide the keyboard #253

Open
zhaojingadmin opened this issue Jan 13, 2020 · 4 comments
Open

How to hide the keyboard #253

zhaojingadmin opened this issue Jan 13, 2020 · 4 comments

Comments

@zhaojingadmin
Copy link

No description provided.

@aznh
Copy link

aznh commented Jan 15, 2020

GestureDetector(
    onTap: () {
        SystemChannels.textInput.invokeMethod('TextInput.hide');
    },
    child: // your webview widget
)

This will help you

@zhaojingadmin
Copy link
Author

This solution I know, what I want to solve now is that when I use inappwebview, when I click the input box to turn on the keyboard, it cannot be turned off automatically

@aznh
Copy link

aznh commented Jan 19, 2020

This solution I know, what I want to solve now is that when I use inappwebview, when I click the input box to turn on the keyboard, it cannot be turned off automatically

How about add "blur" event to your input box? And then you can call 'TextInput.hide' method in your flutter code

This was referenced Jul 6, 2020
@julianramireze
Copy link

GestureDetector(
    onTap: () {
        SystemChannels.textInput.invokeMethod('TextInput.hide');
    },
    child: // your webview widget
)

This will help you

This really work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants