I am making a flutter app, which counts down to events. What I would need is a way to refresh a ListView's subtitle every second. I am storing all of the events in a list, and I have a function, which takes an index as an argument and returns the time remaining to the event at the given index. This function is written in the subtitle of the ListView, and I'd like to update it every second. Any help is appreciated.
Asked
Active
Viewed 329 times
0
-
I think https://stackoverflow.com/a/54611581/11427294 helps you. – Kaushik Bhingradiya May 16 '20 at 17:54
-
Does this answer your question? [Flutter Countdown Timer](https://stackoverflow.com/questions/54610121/flutter-countdown-timer) – Richie Bendall May 17 '20 at 02:08
1 Answers
0
You can use StatefulBuilder + DateTime to update it
StatefulBuilder(
builder: (BuildContext context, setState){
}
);

Islomkhuja Akhrarov
- 1,277
- 9
- 19