API Call (or supabase query) to list of custom data type

Database & APIs

Im trying to save the result of an API call (or supabase query) into a list of data type.

When loading a page i get all the products of a user and want to to store it in a list of <product> on the app state. On that same page i have a search bar and i want to search through my list to display the results instead of querying each search.

How do i do this and is this even a good idea? I looked a bit into caching and wanted to cache the entire product catalog of the user and then do the search on the cache if thats even possible but im unsure when to use what. (a good app probably needs both).

(WHY do i NEED an image to post my question???)

What have you tried so far?

research on documentation only provided an example for storing the api call result into a single <data type> instance not a list of <data type> but not a list

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