Pagination with FlutterFlow

Hey everyone,

i have managed to integrate algolia to FlutterFlow. My indexes are up to 20k big. So i urgently need pagination.

With the standard integration i dont see any possibility to do that, right?
I tried to use the API, which would work i guess but i am not able to connect document references from json then.

Any ideas on how to solve that? I am pretty sure someone did that already.

Thanks already :slight_smile:
Patrick

Hi @patzapps!

I reached out to the folks over at FlutterFlow (they built the integration) and they had a few thoughts and suggestions:

We definitely need to update our Algolia implementation to support some of the options the pub.dev package supports.

That said, the user in this case could use a few different methods.

  • One could be to use the “To Data Type” option that is available after getting the JSON back from the API call. They could convert the JSON into a pre-created Data Type (which, for example, could include their variable as a doc reference). That would probably be easiest that way they can use the data type variable names instead of having to define the JSON path each time in the FlutterFlow editor (I’d argue this might be best practice).
  • Another alternative method could be to write a custom function in FlutterFlow which converts the document reference path string into an actual Firestore document reference.They’d most likely have to manage pagination manually via a component state, page state or app state variable: storing the first and last index number they want to show and then adding/subtracting from that state variable upon an action (most likely a button click).

We brush on this abstractly in the livecoding session here, but it might be time for a deeper dive session with the FlutterFlow folks.