I'd like to create a timer for a flutter website that counts down to a certain date.
eg
120
Days 12
Hours 45
Mins 15
Secs
Is that possible and can anyone help?
I haven't got a clue where to start with this one..
You can use this package https://pub.dev/packages/countdown_flutter
Note: In this package you will see a duration property. You should locate time difference between nowDate and the other date
var nextDate = DateTime(2023, 10, 29);
var nowDate = DateTime.now();
var difference = nowDate.difference(nextDate);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.