Custom Function For Win Logic Just Will Not Work.

Troubleshooting

Am making a bingo game for a friend's wedding in a few months and I've got most of the core foundation done and working, except for the win logic custom function. It checks for wins in Rows/Columns/Diagonals and that there are at least 5 matching values (not order sensitive).

Thank you for reviewing.

What have you tried so far?

I have attempted to use both ChatGPT and Grok, but both state it 'should' be working and can't seem to figure out why it's not. Heck, ChatGPT even tried saying FlutterFlow's test function feature was broken until I showed it a screenshot of a test celsius to fahrenheit (yup, from the FF custom function YT video...lol) screenshot.

I've confirmed the inputs I'm attempting to pass into the custom function are good values, have confirmed it's a List<string> data type, and confirmed those values DO populate within my GamePage GridView widget tree and debug panel . . . but it will not evaluate.

I can't even get it to evaluate in the Test Function area of FlutterFlow, even when reducing the win condition to a single value, the test function feature fails every time. I've been using both ChatGPT and Grok and both seem to state it 'should' be working. Sadly, it's probably something simple I'm over looking, too.

I've reduced the win condition to a single value, just trying to get it to pass a good result even if it says false, but all I get are nulls. I also have tried using 5 and "5" (for example) as tests, but still a NULL result but a single digit 5 is in the win conditions list.

Screenshots:
CheckWinMain1: Core checkForWin Custom Function
In this above screenshot core CheckForWin function, I've tried and ALL produced NULL:

10,11,12,13,14
"10","11","12","13","14"
[10,11,12,13,14 ]
["10","11","12","13","14"]

Then also used "Add Item" to add additional lines-just trying everything-and did this WITH quotation marks too.

10
11
12
13
14

CheckWinDebug1: Simplified version of custom function for single value win condition.
CheckWinDebug2: Ran test of simplified function using a single value win condition.

Did you check FlutterFlow's Documentation for this topic?
No
2
1 reply