Problem with the total of a cart

Custom Code

Hello, I'm reaching out to you because I'm trying to add up the durations of services in the user cart in order to later manage appointment bookings, but it isn't working.

I used a custom function for the calculation, and for testing purposes, I managed to sum up all the duration fields in my database collection, and it displays the result correctly. The provided screenshot is related to the test I performed on the collection calculation.

However, when I try to do the same thing for the cart (App State), I can't get it to work. Could someone help me solve my problem? Thank you.

What have you tried so far?

I have watched several YouTube videos and also looked on discussion forums, but nothing has been able to help me.

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