• Andrea Cioni's avatar
    Add an example for `InputChip` generated by user input (#130645) · 400702d1
    Andrea Cioni authored
    New example for `InputChip` that 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 `InputChip` that 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:
    
    - https://github.com/flutter/flutter/issues/128247
    
    **Code structure:**
    
    The example app is composed of 2 main components that find places inside `MainScreen`:
    
     - `ChipsInput`
     - `ListView`
    
    `ChipsInput` emulates a `TextField` where you can enter text. This text field accepts also a list of values of generic type T (`Topping` in my example), that gets rendered as `InputChip` inside the text field, before the text inserted by the user. This widgets is basically an `InputDecorator` widget that implements `TextInputClient` to get `TextEditingValue` events from the user keyboard. At the end of the input field there is another component, the `TextCursor`, that is displayed just when the user give the focus to the field and emulates the carrets that `TextField` has.
    
    There are also some available callbacks that the user can use to capture events in the `ChipsInput` field like: `onChanged`, `onChipTapped`, `onSubmitted` and `onTextChanged`. This last callback is used to build a list of suggestion that will be placed just below the `ChipsInput` field inside the `ListView`.
    400702d1
Name
Last commit
Last update
..
about Loading commit data...
action_buttons Loading commit data...
action_chip Loading commit data...
animated_icon Loading commit data...
app_bar Loading commit data...
autocomplete Loading commit data...
banner Loading commit data...
bottom_app_bar Loading commit data...
bottom_navigation_bar Loading commit data...
bottom_sheet Loading commit data...
button_style Loading commit data...
card Loading commit data...
checkbox Loading commit data...
checkbox_list_tile Loading commit data...
chip Loading commit data...
choice_chip Loading commit data...
color_scheme Loading commit data...
context_menu Loading commit data...
data_table Loading commit data...
date_picker Loading commit data...
dialog Loading commit data...
divider Loading commit data...
drawer Loading commit data...
dropdown Loading commit data...
dropdown_menu Loading commit data...
elevated_button Loading commit data...
expansion_panel Loading commit data...
expansion_tile Loading commit data...
filled_button Loading commit data...
filter_chip Loading commit data...
flexible_space_bar Loading commit data...
floating_action_button Loading commit data...
floating_action_button_location Loading commit data...
icon_button Loading commit data...
ink Loading commit data...
ink_well Loading commit data...
input_chip Loading commit data...
input_decorator Loading commit data...
list_tile Loading commit data...
material_state Loading commit data...
menu_anchor Loading commit data...
navigation_bar Loading commit data...
navigation_drawer Loading commit data...
navigation_rail Loading commit data...
outlined_button Loading commit data...
page_transitions_theme Loading commit data...
paginated_data_table Loading commit data...
platform_menu_bar Loading commit data...
popup_menu Loading commit data...
progress_indicator Loading commit data...
radio Loading commit data...
radio_list_tile Loading commit data...
range_slider Loading commit data...
refresh_indicator Loading commit data...
reorderable_list Loading commit data...
scaffold Loading commit data...
scrollbar Loading commit data...
search_anchor Loading commit data...
segmented_button Loading commit data...
selectable_region Loading commit data...
selection_area Loading commit data...
selection_container Loading commit data...
slider Loading commit data...
snack_bar Loading commit data...
stepper Loading commit data...
switch Loading commit data...
switch_list_tile Loading commit data...
tab_controller Loading commit data...
tabs Loading commit data...
text_button Loading commit data...
text_field Loading commit data...
text_form_field Loading commit data...
theme Loading commit data...
theme_data Loading commit data...
time_picker Loading commit data...
toggle_buttons Loading commit data...
tooltip Loading commit data...