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

FormBuilderChipsInput #213

Closed
tanmaypandharipande opened this issue Dec 26, 2019 · 1 comment
Closed

FormBuilderChipsInput #213

tanmaypandharipande opened this issue Dec 26, 2019 · 1 comment

Comments

@tanmaypandharipande
Copy link

Not able to set the data into chipsBuilder after returning from route. Can you help out with the FormBuilderChipsInput which on click goes to another route and on response gets the data and fills in form of Chips. Current Code

FormBuilderChipsInput(
attribute: "ABC",
decoration: InputDecoration(
contentPadding:
EdgeInsets.all(8),
labelText: "Label"),
validators: [],
initialValue:
widget.values,
chipBuilder: (context, state,
selectedOptions) {
return InputChip(
deleteIcon: Icon(null),
elevation: 5,
key: ObjectKey(selectedOptions),
label: Text(
selectedOptions.toString()),
onDeleted: () {
state.deleteChip(
selectedOptions);
},
materialTapTargetSize:
MaterialTapTargetSize
.shrinkWrap,
);
})

So in this case if I setState the widget.values then the FormBuilderChipsInput isn't updating, I am purposely taking another bool to manage the thing, which I don't want to do. Any another way?

@danvick
Copy link
Collaborator

danvick commented Jul 18, 2020

This issue should be fixed. Feel free to reopen if not

@danvick danvick closed this as completed Jul 18, 2020
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

2 participants