How to create leaderboard where users need to post more than 5 results to show?

Database & APIs

Hello,

I have a leaderboard at the moment but the big issue is, users can post once and it shows their score on the leaderboard. This isn't good as my scores are based on averages, so users can have a higher score if they only get one good score and post that.

I want to make the leaderboard only show users with 5+ posts. The issue with this is that If i choose a filter in my databse query to have the users who have posted more than or equal to 5, i have to then order by posts.

I have tried aranging by dynamic children but my posts count is stored as an integer and doesn't let me filter for more than or equal to 5, even if using the random integer input.

How the leaderboard works is i query all the players and order by their average result and generate dynamic children.
I then pass the index in list to each user to the relevant component to display in the UI.

What have you tried so far?

Filtering more than or equal to 5 in the query

Trying to show users with 5+ posts in dynamic children.

I have added some screenshots below.

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