From 81b9845041f39e178e3235d2048893e455ba226d Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Thu, 4 Mar 2021 16:00:14 -0800 Subject: [PATCH] [flutter_tools] migrate async_guard.dart to null safety (#76748) --- packages/flutter_tools/lib/src/base/async_guard.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/flutter_tools/lib/src/base/async_guard.dart b/packages/flutter_tools/lib/src/base/async_guard.dart index 19e9f66c6f..1e75a2b713 100644 --- a/packages/flutter_tools/lib/src/base/async_guard.dart +++ b/packages/flutter_tools/lib/src/base/async_guard.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// @dart = 2.8 - import 'dart:async'; /// Runs [fn] with special handling of asynchronous errors. @@ -82,7 +80,7 @@ import 'dart:async'; /// [ArgumentError] will be thrown synchronously. Future asyncGuard( Future Function() fn, { - Function onError, + Function? onError, }) { if (onError != null && onError is! _UnaryOnError &&