ListView with dynamic children has error with single result from API

Database & APIs
Resolved

Hello everyone,

I have a ListView from which I do an API call in the Backend Query to get a list of devices. I then generate children from the result. When I have two or more devices, the list is properly populated but if I get only one device, I get a red screen of death:

What have you tried so far?

I launched a debug session in VS Code and an exception was caught here:

I went into the getJsonFiled function and saw that it returns a map if length is greater than 1:

Here's the Json query result:

One last thing, if I add the "isForList" parameter with the value "true", it works well and do not get the error.

Is it my Json Path filter that is inadequate or is this a bug?

Did you check FlutterFlow's Documentation for this topic?
Yes
4 replies