minimum_duration 0.0.1 minimum_duration: ^0.0.1 copied to clipboard
A minimum duration utility for Dart.
example/minimum_duration_example.dart
import 'package:minimum_duration/minimum_duration.dart';
void main() async {
// Wrap your logic in a call to `minimumDuration`
final result = await minimumDuration(() {
// The logic in here will execute, but the result won't be returned
// until the minimum duration has elapsed (defaults to 250ms).
print('Some async logic here');
return 'hello world';
});
print(result);
}