-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Use case
iOS supports since iOS 7.0 the keyboard type webSearch which is a system keyboard that can be used in text fields that both search, but also cope with URLs. From the official documentation:
UIKeyboardTypeWebSearch API_AVAILABLE(ios(7.0)), // A default keyboard type with URL-oriented addition (shows space . prominently).On Android this type could be mapped to url as it does pretty much the same, and has both space and . keys.
On iOS the url keyboard is useless for the search use case as it won't show a space bar.
I tried to workaround with custom iOS code but this is very tedious and I didn't find a solution.
Also there is a third-party package keyboard_actions which allows to add a top-bar "." button, but this unfortauntely isn't the same user experience. Browsers like Safari, Chrome and Duck Duck Go use the iOS native UIKeyboardTypeWebSearch in the search bars as well.
Proposal
TextInputTypeshould get a new enumerationwebSearch- On Android (or any other platform) this remapped to
url - The platform dependent code in
flutter/enginefor iOS is adapted to mapwebSearchtoUIKeyboardTypeWebSearch
If there is a chance this is accepted by the Flutter team, I am gladly willing to do the implementation and create PRs for flutter and the engine.
