Duration constructor
Creates a new Duration object whose value is the sum of all individual parts.
Individual parts can be larger than the number of those parts in the next larger unit. For example, hours
can be greater than 23. If this happens, the value overflows into the next larger unit, so 26 hours
is the same as 2 hours
and one more days
. Likewise, values can be negative, in which case they underflow and subtract from the next larger unit.
All arguments are 0 by default.
Implementation
const Duration( {int days = 0, int hours = 0, int minutes = 0, int seconds = 0, int milliseconds = 0, int microseconds = 0}) : this._microseconds(microsecondsPerDay * days + microsecondsPerHour * hours + microsecondsPerMinute * minutes + microsecondsPerSecond * seconds + microsecondsPerMillisecond * milliseconds + microseconds);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-core/Duration/Duration.html