Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an upcoming recommended lint #1680

Merged
merged 1 commit into from Mar 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkgs/test_core/lib/src/util/io.dart
Expand Up @@ -160,7 +160,8 @@ void warn(String message, {bool? color, bool print = false}) {
///
/// This is necessary for ensuring that our port binding isn't flaky for
/// applications that don't print out the bound port.
Future<T> getUnusedPort<T>(FutureOr<T> Function(int port) tryPort) async {
Future<T> getUnusedPort<T extends Object>(
FutureOr<T> Function(int port) tryPort) async {
T? value;
await Future.doWhile(() async {
value = await tryPort(await getUnsafeUnusedPort());
Expand Down