// The following are equivalent:
const a1 = Duration(milliseconds: 1);
const b1 = Milliseconds(1);
const c1 = Duration(microseconds: 1000);
// You can also use floating values
const d1 = Seconds(.0001);
// Each class contains shorthands for constant values
const a2 = Duration.millisecondsPerDay;
const a3 = Milliseconds.perDay;
Utility library for creating Duration
s.
Classes will not augment Duration
, since they are only intended as a shorthand
for creating Duration
s.
See also: