[flutter_tools] migrate async_guard.dart to null safety (#76748)

This commit is contained in:
Jonah Williams
2021-03-04 16:00:14 -08:00
committed by GitHub
parent 9d53c11e17
commit 81b9845041

View File

@@ -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<T> asyncGuard<T>(
Future<T> Function() fn, {
Function onError,
Function? onError,
}) {
if (onError != null &&
onError is! _UnaryOnError<T> &&