commit | 779c28db7a64d4a0f755785a0d918facb69251dd | [log] [tgz] |
---|---|---|
author | Jason Simmons <jsimmons@google.com> | Fri Feb 04 01:11:46 2022 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 04 01:11:46 2022 +0000 |
tree | cfd4864f56c209632fd79f2ec6991d31f496aa5a | |
parent | a4b3b8edec734ddf0d9242639040ee56be747635 [diff] |
[ DDS ] Fix a null safety error in memory_profile.dart See https://github.com/flutter/flutter/issues/97588 Bug: 97588 Change-Id: I95fc1b50b936b7d15d674cc7e1c6908975989d47 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231533 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
diff --git a/pkg/dds/lib/src/devtools/memory_profile.dart b/pkg/dds/lib/src/devtools/memory_profile.dart index da6fa61..03fe5c1 100644 --- a/pkg/dds/lib/src/devtools/memory_profile.dart +++ b/pkg/dds/lib/src/devtools/memory_profile.dart
@@ -8,6 +8,7 @@ import 'dart:async'; import 'dart:io' as io; +import 'package:collection/collection.dart'; import 'package:devtools_shared/devtools_shared.dart'; import 'package:vm_service/vm_service.dart'; @@ -227,9 +228,8 @@ flutterViewListResponse.json!['views'].cast<Map<String, dynamic>>(); // Each isolate should only have one FlutterView. - final flutterView = views.firstWhere( + final flutterView = views.firstWhereOrNull( (view) => view['type'] == 'FlutterView', - orElse: () => null, ); if (flutterView == null) {