I am building a checkout screen that can have multiple pages the user can click through (via the next button), where each pages lists the items for one of the businesses the user is buying from.
But I am having trouble querying my cart collection from Firestore by index. For example, the 1st page should display the checkout info for the business at index 0 in my cart collection, page 2 should display the info for the business at index 1 in the cart collection, and so on.
So far the only thing i have working is the [currentpg]/[totalpgs] at the top right corner, where the current pages increments by 1 when i click next.
Also here is my backend set up. I have a users collection, and a cart subcollection. Within the cart subcollection each document represents a purchase from one business. Please let me know if any further context is neeeded!