Relative Content

Tag Archive for flutterdartlistview

How to overwrite a global variable’s value by declaring it inside a listview

This is for a stopwatch functionality. The xCountUpDuration is the default time for the stopwatch and I have set it in 2 places, one is outside listview (Code 1) and the value is set to 0 and the other is inside listview (Code 3) and the value is set to 10 minutes. The problem is when I call the (Code 2) widget inside listview of (Code 3), the value is set to 0 instead of 10 minutes. How can I make it use the xCountUpDuration value set in Code 3.

Can someone tell me why this sizedbox is acting weird?

I’m trying to display a series on fields from nine documents on firestore. My code works fine but at the last item I can’t scroll past it until I subtract upto 100 from the height of the Container that is the parent of the ListView.separated that’s showing the values from firestore. It’s weird because shouldn’t I be increasing the height of the Container to see more of the ListView? And how do I fix the problem of not scrolling past the last widget without subtracting values from the height of the Container because as the last widget grows in height I would have to continually manually increase the value I’m subtracting.Is there a way to eliminate the use of Container or fix the issue?