Need Help with List Manipulation in FlutterFlow for a Game

Actions & Logic

Hello everyone,

I’m a beginner working on a game in FlutterFlow and could use some guidance. My game is connected to a Firebase collection called ‘Starter’. I’m trying to implement the following features and could use some help:

  1. Query the Collection: I need to query the ‘Starter’ collection and save the results as a list.

  2. Shuffle the List: Once I have the list, I want to shuffle it.

  3. Access the First Item: After shuffling, I need to access the first item in the list and save it to an app state variable.

  4. Go to the Next Item: I want to be able to move to the next item in the list on a button press.

  5. Avoid Duplicates: I need to ensure that the same item is not pulled twice unless the whole list has been gone through.

I’m trying to achieve all of this using FlutterFlow’s built-in actions. Any guidance on how to implement these features would be greatly appreciated!

Thank you in advance for your help!

What have you tried so far?

I've tried creating custom actions for the shuffle. I've created lists and data types. Everything I try, something about it does not work. I feel like this should be so simple yet I'm having such an issue with it.

Did you check FlutterFlow's Documentation for this topic?
Yes
3
1 reply