-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add an example for InputChip generated by user input
#130645
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
Conversation
|
Yeah 😅, I'm figuring these out. I'll try to fix them in a couple of days. |
|
Hi @andreacioni
|
|
Hi @TahaTesser, Thanks for your time too. I'm really enjoying contributing to these project! I've updated the description but I've some questions related to the other points:
Where it should be the best place to describe it? Here or the PR or in the code itself?
Are you talking about the Search hint text or the label?
Which OS are you using? Mac or Windows? I'm not able to reproduce on Mac OS X . |
In the description, please explain the code structure. I can see there several things happening in
Yes, you can "Seerch" text isn't aligned with the prefix icon. please make sure there are no visual or functionality issues.
Mac. Type some text and try to delete it with the backspace or delete key. |
|
Hi @TahaTesser, some updates about:
I guess this is related to another issue that involves Mac OS X platform. I can't do much here if it won't be solved. The problem is related to the main component ( |
give up using scrollable content because of the misalignment that caused on the hint
|
Description is now updated. Let me know if you need more details. |
TahaTesser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some simplifications and cleanup.
|
This also requires some functionality tests and documentation. See examples are documented in https://github.com/flutter/flutter/pull/128295/files |


New example for
InputChipthat demonstrate how to create/delete them based on user text inputs.The sample application shows a custom text area where user can enter text. After the user has typed and hits Enter the text will be replaced with an
InputChipthat contains that text. Is it possible to continue typing and add more chips in this way. All of them will be placed in a scrollable horizontal row. Also is it possible to have suggestion displayed below the text input field in case the typed text match some of the available suggestions.Issue I'm trying to solve:
InputChips being generated from user's input. #128247Code structure:
The example app is composed of 2 main components that find places inside
MainScreen:ChipsInputListViewChipsInputemulates aTextFieldwhere you can enter text. This text field accepts also a list of values of generic type T (Toppingin my example), that gets rendered asInputChipinside the text field, before the text inserted by the user. This widgets is basically anInputDecoratorwidget that implementsTextInputClientto getTextEditingValueevents from the user keyboard. At the end of the input field there is another component, theTextCursor, that is displayed just when the user give the focus to the field and emulates the carrets thatTextFieldhas.There are also some available callbacks that the user can use to capture events in the
ChipsInputfield like:onChanged,onChipTapped,onSubmittedandonTextChanged. This last callback is used to build a list of suggestion that will be placed just below theChipsInputfield inside theListView.Pre-launch Checklist
///).