Hi everyone!
I created a postgres function in Supabase that returns a list (SETOF) Stores (Stores is a table in my database).
I need to call this function in flutterflow and get the query result data as List<StoresRow> data type.
I created a custom action like this:
So the action returns a list of Supabase Rows, like the postgres function does.
The "response" variable correctly gets the data from supabase (i used the debugPrint to log the response and i got the json with the correct content printed in the console).
The data type of "response" variable is List<dynamic>.
So everything works fine, until the code returns the response variable, because then the return array becomes empty.
I think the problem is that i returned a variable of type List<dynamic> and not List<StoresRow>, so when trying to return as List<dynamic> it becomes empty.
My question is:
I nedd to return a List<StoresRow> type, so is there a way before the retun statement to convert the List<dynamic> (JSON) array to a List<StoresRow> (Subabase row) array?
Thanks a lot in advance.