Skip to content

DurationOps

extension DurationOps on int

Convenience constructors for creating Duration values from integer literals, e.g. 5.seconds, 200.milliseconds.

Properties

day extension no setter

Duration get day

A Duration of this many days.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get day => Duration(days: this);

days extension no setter

Duration get days

A Duration of this many days.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get days => Duration(days: this);

hour extension no setter

Duration get hour

A Duration of this many hours.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get hour => Duration(hours: this);

hours extension no setter

Duration get hours

A Duration of this many hours.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get hours => Duration(hours: this);

microsecond extension no setter

Duration get microsecond

A Duration of this many microseconds.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get microsecond => Duration(microseconds: this);

microseconds extension no setter

Duration get microseconds

A Duration of this many microseconds.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get microseconds => Duration(microseconds: this);

millisecond extension no setter

Duration get millisecond

A Duration of this many milliseconds.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get millisecond => Duration(milliseconds: this);

milliseconds extension no setter

Duration get milliseconds

A Duration of this many milliseconds.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get milliseconds => Duration(milliseconds: this);

minute extension no setter

Duration get minute

A Duration of this many minutes.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get minute => Duration(minutes: this);

minutes extension no setter

Duration get minutes

A Duration of this many minutes.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get minutes => Duration(minutes: this);

second extension no setter

Duration get second

A Duration of this many seconds.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get second => Duration(seconds: this);

seconds extension no setter

Duration get seconds

A Duration of this many seconds.

Available on int, provided by the DurationOps extension

Implementation
dart
Duration get seconds => Duration(seconds: this);