Duration class

A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution.

It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.

Constructors

Duration({int? nanos, String? seconds})
Duration.fromJson(Map json_)

Properties

hashCode int
The hash code for this object.
no setterinherited
nanos int?
Signed fractions of a second at nanosecond resolution of the span of time.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seconds String?
Signed seconds of the span of time.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited