-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Search input widget #6691
Comments
Presumably you mean https://material.google.com/patterns/search.html? Or is there a better reference? @HansMuller would know. |
I also know that https://github.com/flutter/flutter/tree/master/examples/stocks has search functionality. I don't recall if it conforms to that pattern or not however. |
Yes, I mean https://material.google.com/patterns/search.html. I saw in the example they are using input widget and search icon to achieve this functionality. I also tried using input widget, but there's a problems: I did not find a way to hide the line in input widget. |
An widget that has the capability to hide its line would be sufficient. We actually have scenarios where a magnifying glass icon is not desirable (such as when search is within the appbar). So a complete "search widget" might be an overkill. |
If using RawInput instead of Input is a sufficient solution to this problem, then we should add documentation to Input that points people to RawInput if they don't want the material look of an Input control. |
Here's an example of using RawInput directly.
|
I was able to achieve it using the rawinput but this also requires me to include file 'text_selection.dart' in order to set selection control to I also had to use stack to draw the hint text and a flex to make sure input does not overflow. Full code below: new Container(
padding: const EdgeInsets.all(16.0),
child: new Row(children: [
new Icon(Icons.search, color: Colors.grey[600], size: 32.0),
new Padding(padding: const EdgeInsets.only(left: 16.0)),
new Flexible(child: new Stack(children: [
new Positioned(
left: 0.0,
top: 0.0,
child: new Text(config.placeHolderText, style: hintStyle)),
),
new RawInput(
key: _rawInputKey,
focusKey: _rawInputKey,
selectionControls: materialTextSelectionControls,
cursorColor: const Color(0xFF00FF00),
value: _value,
onChanged: (InputValue newValue) {
setState(() {
_value = newValue;
});
},
),
])),
])
) It looks too complex for a search box. Could you please take a look? |
The underlining of the word is part of IME. It's the word currently being typed that you can replace with autocomplete. That's not a bug. |
Is there a Search widget because i can't find anything about it except this link: https://material.io/guidelines/patterns/search.html#search-in-app-search ? |
We have an internally developed auto-complete/search widget that will be pushed to external within a month's time frame. Stay tuned. |
@DaveShuckerow FYI |
If this is available, I'd love a pointer. Otherwise, I'll wait patiently. |
I'm not sure of the status. The bug looks like its closed. Is there more work to do here @HansMuller? |
I think the original request isn't done yet as far as I can tell. We have a universal input field but I don't think we have an out of the box search bar with all the material UI treatment and auto-complete attachments. |
@mehmetf, was the internal version released publicly already? |
Not yet. We are developing in the third_party branch however the mechanism to sync this to Github is not in place yet. I am assigning this to Dave who can provide more context. |
Hi all, Work is going on internal to Google on this widget; I've been resolving the approvals that we need to get to roll code written inside Google out into GitHub. Stay tuned. |
Just happen to be looking for this, and glad to see theres been an update recently. |
Any news? I could make use of something like this. |
Just created a plugin that might help: https://pub.dartlang.org/packages/material_search |
Any update on this ? |
Is the widget finally out?! |
My apologies for letting this issue grow stale for SO long. Support for a search bar, per the Material Design spec, is among the goals for Flutter development this summer: #17119 |
Material's Expandable Search is now available in Flutter as of #17629. |
…#23596) 162b2e9..7be0217 7be0217 Roll back _countryCode assert - breaking change (#6693) 91a019c Fix popSystemNavigator (#6691) 2b2fbf0 Add Locale.fromSubtags and support for scriptCode. (#6518) 58c8e30 Roll src/third_party/skia ab18c8e6cc20..d48b7a881b24 (5 commits) (#6690) 3b17cfb Flutter tester default locales (#6689) 96bbd2b Roll buildroot to 11a934e99eaa4aa8e278cd2772aff4f51f1f3c41 (#6687) 0e9defb Roll src/third_party/skia 68825776f4b4..ab18c8e6cc20 (11 commits) (#6688) cc686d7 Don't populate the external view embedder in PaintContext. (#6686) ab782fa Roll src/third_party/skia 1de48d8040aa..68825776f4b4 (1 commits) (#6685) c4aa8d3 Roll src/third_party/skia 797197a772b8..1de48d8040aa (2 commits) (#6684) 7352251 Roll src/third_party/skia 79c96811863f..797197a772b8 (1 commits) (#6683) 3dac47e Roll src/third_party/skia 38e4fd0c5654..79c96811863f (1 commits) (#6682) 2f06a53 Roll src/third_party/skia b53f1f46982d..38e4fd0c5654 (1 commits) (#6681) a1d7cad Fix inconsistent include syntax (#6680) 236661c Roll src/third_party/skia 3b79aa3a5ad0..b53f1f46982d (13 commits) (#6679) c4f5061 Roll buildroot to pick up Mac toolchain updates. (#6678) ba8f6aa Handle Windows headers defining ERROR to 0 in log levels. (#6677) 505d2a9 Roll buildroot to pick up updates to custom toolchains. (#6674) 6c2a0b3 Undefine ERROR in platform_view_layer.cc (#6675) 55e1299 Update FlutterPlugin.h docs, suppress warning for older API (#6672) f797004 Attach and position embedded UIVIews (#6614) df85722 Plumb the iOS PlatformViewsController into flow. (#6603) 2bfb893 iOS Embedding Refactor (#6447)
…flutter#23596) 162b2e9..7be0217 7be0217 Roll back _countryCode assert - breaking change (flutter#6693) 91a019c Fix popSystemNavigator (flutter#6691) 2b2fbf0 Add Locale.fromSubtags and support for scriptCode. (flutter#6518) 58c8e30 Roll src/third_party/skia ab18c8e6cc20..d48b7a881b24 (5 commits) (flutter#6690) 3b17cfb Flutter tester default locales (flutter#6689) 96bbd2b Roll buildroot to 11a934e99eaa4aa8e278cd2772aff4f51f1f3c41 (flutter#6687) 0e9defb Roll src/third_party/skia 68825776f4b4..ab18c8e6cc20 (11 commits) (flutter#6688) cc686d7 Don't populate the external view embedder in PaintContext. (flutter#6686) ab782fa Roll src/third_party/skia 1de48d8040aa..68825776f4b4 (1 commits) (flutter#6685) c4aa8d3 Roll src/third_party/skia 797197a772b8..1de48d8040aa (2 commits) (flutter#6684) 7352251 Roll src/third_party/skia 79c96811863f..797197a772b8 (1 commits) (flutter#6683) 3dac47e Roll src/third_party/skia 38e4fd0c5654..79c96811863f (1 commits) (flutter#6682) 2f06a53 Roll src/third_party/skia b53f1f46982d..38e4fd0c5654 (1 commits) (flutter#6681) a1d7cad Fix inconsistent include syntax (flutter#6680) 236661c Roll src/third_party/skia 3b79aa3a5ad0..b53f1f46982d (13 commits) (flutter#6679) c4f5061 Roll buildroot to pick up Mac toolchain updates. (flutter#6678) ba8f6aa Handle Windows headers defining ERROR to 0 in log levels. (flutter#6677) 505d2a9 Roll buildroot to pick up updates to custom toolchains. (flutter#6674) 6c2a0b3 Undefine ERROR in platform_view_layer.cc (flutter#6675) 55e1299 Update FlutterPlugin.h docs, suppress warning for older API (flutter#6672) f797004 Attach and position embedded UIVIews (flutter#6614) df85722 Plumb the iOS PlatformViewsController into flow. (flutter#6603) 2bfb893 iOS Embedding Refactor (flutter#6447)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Is there a search box widget that follows the search pattern in material design?
The text was updated successfully, but these errors were encountered: