Bump flutter_lints to 6.0.0 (#9792)
diff --git a/packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_controller.dart b/packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_controller.dart index 6e51d11..4464b8c 100644 --- a/packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_controller.dart +++ b/packages/devtools_app/lib/src/screens/deep_link_validation/deep_links_controller.dart
@@ -444,7 +444,7 @@ appLink.intentFilterChecks, ), os: {PlatformOS.android}, - scheme: {if (scheme != null) scheme}, + scheme: {?scheme}, ); } else { final linkData = domainPathToLinkData[domainAndPath]!;
diff --git a/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/arrow.dart b/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/arrow.dart index 3adb4e6..6035809 100644 --- a/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/arrow.dart +++ b/packages/devtools_app/lib/src/screens/inspector_v2/layout_explorer/ui/arrow.dart
@@ -100,7 +100,7 @@ ), ), ), - if (child != null) child!, + ?child, Expanded( child: Container( margin: EdgeInsets.only(
diff --git a/packages/devtools_app/lib/src/screens/logging/metadata.dart b/packages/devtools_app/lib/src/screens/logging/metadata.dart index 9ac216e..081762c 100644 --- a/packages/devtools_app/lib/src/screens/logging/metadata.dart +++ b/packages/devtools_app/lib/src/screens/logging/metadata.dart
@@ -97,8 +97,8 @@ FrameElapsedMetaDataChip( elapsedTimeDisplay: elapsedFrameTimeAsString, ), - if (isolateChip != null) isolateChip, - if (zoneChip != null) zoneChip, + ?isolateChip, + ?zoneChip, ], ); }
diff --git a/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis_model.dart b/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis_model.dart index d1316e4..0e82e25 100644 --- a/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis_model.dart +++ b/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis_model.dart
@@ -92,9 +92,7 @@ final paintEvent = uiEvent.firstChildWithCondition( (event) => FramePhaseType.paint.isMatchForEventName(event.name), ); - return FramePhase.paint( - events: <FlutterTimelineEvent>[if (paintEvent != null) paintEvent], - ); + return FramePhase.paint(events: <FlutterTimelineEvent>[?paintEvent]); } /// Data for the raster phase of [frame].
diff --git a/packages/devtools_app/lib/src/screens/profiler/cpu_profile_model.dart b/packages/devtools_app/lib/src/screens/profiler/cpu_profile_model.dart index 038bf98..f1eb442 100644 --- a/packages/devtools_app/lib/src/screens/profiler/cpu_profile_model.dart +++ b/packages/devtools_app/lib/src/screens/profiler/cpu_profile_model.dart
@@ -745,13 +745,11 @@ List<CpuStackFrame>? _bottomUpRoots; late final userTags = <String>{ - for (final cpuSample in cpuSamples) - if (cpuSample.userTag case final userTag?) userTag, + for (final cpuSample in cpuSamples) ?cpuSample.userTag, }; late final vmTags = <String>{ - for (final cpuSample in cpuSamples) - if (cpuSample.vmTag case final vmTag?) vmTag, + for (final cpuSample in cpuSamples) ?cpuSample.vmTag, }; CpuStackFrame? selectedStackFrame;
diff --git a/packages/devtools_app/lib/src/screens/vm_developer/process_memory/process_memory_view.dart b/packages/devtools_app/lib/src/screens/vm_developer/process_memory/process_memory_view.dart index 1b453e0..9ae5d1d 100644 --- a/packages/devtools_app/lib/src/screens/vm_developer/process_memory/process_memory_view.dart +++ b/packages/devtools_app/lib/src/screens/vm_developer/process_memory/process_memory_view.dart
@@ -194,7 +194,7 @@ keyFactory: (e) => PageStorageKey<String>('${e.name}+${e.depth}+${e.byteSize}'), displayTreeGuidelines: true, - dataRoots: [if (root != null) root], + dataRoots: [?root], dataKey: 'process-memory-tree', columns: columns, treeColumn: categoryColumn,
diff --git a/packages/devtools_app/lib/src/screens/vm_developer/vm_developer_common_widgets.dart b/packages/devtools_app/lib/src/screens/vm_developer/vm_developer_common_widgets.dart index ac39521..06f7f6c 100644 --- a/packages/devtools_app/lib/src/screens/vm_developer/vm_developer_common_widgets.dart +++ b/packages/devtools_app/lib/src/screens/vm_developer/vm_developer_common_widgets.dart
@@ -155,7 +155,7 @@ ), ), ), - if (table != null) table, + ?table, ], ); }
diff --git a/packages/devtools_app/lib/src/shared/console/console.dart b/packages/devtools_app/lib/src/shared/console/console.dart index c9840ce..91ead2a 100644 --- a/packages/devtools_app/lib/src/shared/console/console.dart +++ b/packages/devtools_app/lib/src/shared/console/console.dart
@@ -49,7 +49,7 @@ child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - if (title != null) title!, + ?title, Expanded(child: child), ], ),
diff --git a/packages/devtools_app/lib/src/shared/environment_parameters/environment_parameters_external.dart b/packages/devtools_app/lib/src/shared/environment_parameters/environment_parameters_external.dart index 30cd68f..d46afca 100644 --- a/packages/devtools_app/lib/src/shared/environment_parameters/environment_parameters_external.dart +++ b/packages/devtools_app/lib/src/shared/environment_parameters/environment_parameters_external.dart
@@ -134,10 +134,7 @@ String? additionalInfo, String? issueTitle, }) { - final issueBody = [ - if (additionalInfo != null) additionalInfo, - ...environment, - ].join('\n'); + final issueBody = [?additionalInfo, ...environment].join('\n'); return Uri.parse( 'https://$_newDevToolsIssueUriDisplay',
diff --git a/packages/devtools_app/lib/src/shared/server/server_api_client.dart b/packages/devtools_app/lib/src/shared/server/server_api_client.dart index 8406975..9e646ab 100644 --- a/packages/devtools_app/lib/src/shared/server/server_api_client.dart +++ b/packages/devtools_app/lib/src/shared/server/server_api_client.dart
@@ -117,7 +117,7 @@ 'jsonrpc': '2.0', 'id': id, 'method': method, - if (params != null) 'params': params, + 'params': ?params, }); final completer = Completer<T>(); _completers[id] = completer;
diff --git a/packages/devtools_app/lib/src/shared/ui/side_panel.dart b/packages/devtools_app/lib/src/shared/ui/side_panel.dart index 707c261..16d1943 100644 --- a/packages/devtools_app/lib/src/shared/ui/side_panel.dart +++ b/packages/devtools_app/lib/src/shared/ui/side_panel.dart
@@ -104,7 +104,7 @@ ); return Stack( children: [ - if (child != null) child, + ?child, SidePanel( sidePanelController: widget.controller, visibilityAnimation: visibilityAnimation,
diff --git a/packages/devtools_app/lib/src/shared/utils/utils.dart b/packages/devtools_app/lib/src/shared/utils/utils.dart index 5cc3e8a..b19bd58 100644 --- a/packages/devtools_app/lib/src/shared/utils/utils.dart +++ b/packages/devtools_app/lib/src/shared/utils/utils.dart
@@ -110,7 +110,7 @@ title: 'Connected app type', description: connectedApp.display, ), - if (vmServiceConnection != null) vmServiceConnection, + ?vmServiceConnection, ConnectionDescription(title: 'Dart Version', description: version), if (flutterVersion != null && !flutterVersion.unknown) ...{ ConnectionDescription(
diff --git a/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/src/autocomplete.dart b/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/src/autocomplete.dart index 24ed3d8..befc2b5 100644 --- a/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/src/autocomplete.dart +++ b/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/src/autocomplete.dart
@@ -56,15 +56,14 @@ var someField = 3; static var someStaticField = 2; int get someProperty => 42; - // ignore: avoid-dynamic, gets in the way of testing. - set someSomeProperty(v) {} + set someSomeProperty(int v) {} } var someTopLevelField = 9; int get someTopLevelGetter => 42; -set someTopLevelSetter(v) {} +set someTopLevelSetter(int v) {} void someTopLevelMember() {}
diff --git a/packages/devtools_app/test/test_infra/scenes/standalone_ui/editor_service/simulated_editor.dart b/packages/devtools_app/test/test_infra/scenes/standalone_ui/editor_service/simulated_editor.dart index 4a18e78..c17709e 100644 --- a/packages/devtools_app/test/test_infra/scenes/standalone_ui/editor_service/simulated_editor.dart +++ b/packages/devtools_app/test/test_infra/scenes/standalone_ui/editor_service/simulated_editor.dart
@@ -310,10 +310,10 @@ FutureOr<void> openDevToolsPage( String? _, - String? __, - bool ___, - bool ____, - bool _____, + String? _, + bool _, + bool _, + bool _, ) {} }
diff --git a/pubspec.lock b/pubspec.lock index a55f54d..a2a5876 100644 --- a/pubspec.lock +++ b/pubspec.lock
@@ -360,10 +360,10 @@ dependency: "direct dev" description: name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.0.0" flutter_markdown: dependency: transitive description: @@ -515,10 +515,10 @@ dependency: transitive description: name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "5.1.1" + version: "6.1.0" logging: dependency: transitive description:
diff --git a/pubspec.yaml b/pubspec.yaml index d592000..0d862ed 100644 --- a/pubspec.yaml +++ b/pubspec.yaml
@@ -14,4 +14,4 @@ dev_dependencies: build_runner: ^2.5.4 - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0