Bad state: No element

Widgets & Design

I have a query that runs at page load (that calculates the sum of the records in the Firestore database). While (I guess) loading, I am getting a quick red screen (see attached) saying:

Bad state: No element

The relevant error-causing widget was: StreamBuilder

What have you tried so far?

I have reviewed similar posts (all of them have a widget named in the error) and checked the query+function (they run fine, as you can see by the correct display milisecs after the red screen).

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