Skip to content

Instantly share code, notes, and snippets.

@KoheiKanagu
Created February 18, 2020 01:25
Show Gist options
  • Save KoheiKanagu/909f2e130405b10fc4e78c491a1ae02f to your computer and use it in GitHub Desktop.
Save KoheiKanagu/909f2e130405b10fc4e78c491a1ae02f to your computer and use it in GitHub Desktop.
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