ExtensionDuration extension

on

Properties

toEndHours String
以时结尾
no setter
toEndMilliseconds String
以毫秒结尾
no setter
toEndMinutes String
以分结尾
no setter
toEndSeconds String
以秒结尾
no setter

Methods

add(Duration duration, [Duration? secondDuration]) Duration
add duration
delayed<T>([FutureOr<T> callback()?]) Future<T>
final _delay = 3.seconds; print('+ wait $_delay'); await _delay.delayed(); print('- finish wait $_delay'); print('+ callback in 700ms');
subtract(Duration duration, [Duration? secondDuration]) Duration
subtract duration
timer([Function? function]) Timer
Timer
timerPeriodic(void callback(Timer timer)) Timer
需要手动释放timer