Offset constructor

  1. @Possible({RangeError})
Offset([
  1. int hour = 0,
  2. int minute = 0,
  3. int second = 0
])

Creates an Offset.

Contract

Throws a RangeError if the Offset is outside the valid range.

Example

Offset(-10, 0, 0); // -10:00

Offset(-10, -2, -3)); // throws RangeError

Offset(-10, 2, 3)); // -10:02:03

Implementation

@Possible({RangeError})
factory Offset([int hour = 0, int minute = 0, int second = 0]) => _Offset(hour, minute, second);