The date of yesterday in flutter
3,160
DateTime.now().subtract(Duration(days:1))
More info at https://api.flutter.dev/flutter/dart-core/DateTime-class.html
Author by
Mo711
Updated on December 20, 2022Comments
-
Mo711 over 1 year
How can I calculate yesterdays date in dart/flutter? I have the date of today:
DateTime.now()
But I can't just do -1.