Closed pkmangukiya closed 3 years ago
@pkmangukiya : This plugin does not support dart model/ collection as a datasource. Please use JSON encode/ decode and pass JSON Array as datasource.
Thanks
So if i want to use this dart model/collection as a datasource then there is any other way? because of mostly dart model/collection is used instead of JSON.
@pkmangukiya As of now using model is not supported by this plugin. And yeah, if you want to get the values then you need to use this field inside a form. Please check the example available with this plugin. Thanks
I was able to get a dynamic list like this;
dataSource: allUsers.map((e) {
return {
"display": e.email,
"value": e.id,
};
}).toList(),
@debbsefe : Very good suggestion.
Everyone please use the debbsefe's suggestion.
Thanks mate!
When i pass
dataSource
as Model classList<BuildingModel> buildingList = [];
then gives me this errorMy code is