DurationExtension extension

This extension allows Duration to be created straight from the integer.

await Future.delayed(Duration(seconds: 10)); // Before
await Future.delayed(10.seconds); // After
on

Properties

days Duration

Available on int, provided by the DurationExtension extension

no setter
hours Duration

Available on int, provided by the DurationExtension extension

no setter
microseconds Duration

Available on int, provided by the DurationExtension extension

no setter
milliseconds Duration

Available on int, provided by the DurationExtension extension

no setter
minutes Duration

Available on int, provided by the DurationExtension extension

no setter
seconds Duration

Available on int, provided by the DurationExtension extension

no setter