Timespan.today constructor
Timespan.today({
- int daysAgo = 0,
Get Timespan of a day. if daysAgo is zero, the end of the timespan is DateTime.now()
Implementation
factory Timespan.today({int daysAgo = 0}) => (daysAgo == 0)
? Timespan(begin: DateTime.now().midnight())
: Timespan(
begin: DateTime.now().midnight(daysAgo: daysAgo),
duration: const Duration(days: 1));