Created
February 18, 2020 01:25
-
-
Save KoheiKanagu/909f2e130405b10fc4e78c491a1ae02f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension on num { | |
Duration get second => Duration(seconds: toInt()); | |
Duration get millisecond => Duration(milliseconds: toInt()); | |
} | |
extension on Duration { | |
Future<void> get delay => Future.delayed(this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment