I am working on flutter expansionTile and added different fields inside that. If I expand the expansionTile and hit submit, The form fields are submitted which are inside expansionTile. But If I collapse it and then hit submit, then only those fields values are displayed that are not collapsed.
Well for the reference here is a piece of code.
ExpansionTile(
backgroundColor: Theme.of(context)
.accentColor
.withOpacity(0.050),
title: Text(item.formName),
children: <Widget>[
FormBuilderCheckboxList(
decoration:
InputDecoration(labelText: item.formName),
attribute: item.uniqueId,
initialValue: [],
// initialValue: item?.answerMultiple.map( (ans) =>ans )??[],
options: item.formFieldOptions
.map((opt) => FormBuilderFieldOption(
value: opt.optName))
.toList(),
),
],
),
So This if I submit this checkbox field expanded then it shows the values on my DEBUG CONSOLE and if I close the ExpansionTile then its not show me any thing. Below is the output when I have expanded the Tile.
flutter: {uid_201994077147: Yes, uid_201985062316: [• Sodium Chloride – (Road Salt, Table Salt) , • Calcium Chloride , • Ammonium Nitrate , Ammonium Sulfate , Sand]}
Thank you all in advance.