I have a backend call that produces a JSON object array that looks like this:
"objectArray":[
{"name":"nameOne","value":10},
{"name":"nameTwo","value":25},
{"name":"nameThree","value":50}
]Using only $objectArray[:].value, the pie chart renders correctly, but when I assign "Legend Labels" the value of $objectArray[:].name, I am getting a TypeError in test mode:
TypeError: Instance of 'JSArray<dynamic>' type 'List<dynamic>' is not a subtype of type 'List<legendEntry>'I haven't been able to find much in the docs, community or elsewhere online, but it looks like Flutter expects a specific format for the legend labels? The data is coming from a Xano API call.
If anyone can point out what I'm overlooking it would be greatly appreciated.