milliseconds property Null safety

Duration milliseconds

Easy way to make Durations from numbers.

Sample:

print(1.seconds + 200.milliseconds);
print(1.hours + 30.minutes);
print(1.5.hours);

Implementation

Duration get milliseconds => Duration(microseconds: (this * 1000).round());