Using API call children variable for drop down list

Howdy all ๐Ÿ‘‹ ๐Ÿ™‚. Does anyone know if I can use this API children variable as an "Initial Option Values" in a Dropdown List, without hacking in a duplicate API call?

This list is dynamically populated from the API response (list of id, name) parsed into DataType -> an app state. But I unable use that app state or the data type into the drop down list.

The Dropdown list in a bottom sheet component triggered when that '+' icon is tapped. I tried passing the list as parameter to the component then using it in the dropdown list, resulted in this error:

The argument type 'List<String>?' can't be assigned to the parameter type 'Iterable<dynamic>' because 'List<String>?' is nullable and 'Iterable<dynamic>' isn't.

I'd appreciate any thoughts/feedback.

2
6 replies