Created
April 5, 2021 13:02
-
-
Save tomaszpolanski/fd5af9d58f164bea622de940763782cc to your computer and use it in GitHub Desktop.
Time provider
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
abstract class TimeProvider { | |
Future<void> delayed(Duration duration); | |
} | |
class TimeProviderImpl implements TimeProvider { | |
@override | |
Future<void> delayed(Duration duration) => Future<void>.delayed(duration); | |
} | |
class MockTimeProvider implements TimeProvider { | |
@override | |
Future<void> delayed(Duration duration) async {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment