From af29d79d1f474a3d64da0d191cdd58cf2d3b0757 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Fri, 6 Sep 2024 15:22:08 -0700 Subject: [PATCH] Delete unreachable `default` clause. (#8303) The Dart analyzer will soon be changed so that if the `default` clause of a `switch` statement is determined to be unreachable by the exhaustiveness checker, a new warning of type `unreachable_switch_default` will be issued. This parallels the behavior of the existing `unreachable_switch_case` warning, which is issued whenever a `case` clause of a `switch` statement is determined to be unreachable. For details see https://github.com/dart-lang/sdk/issues/54575. This PR deletes an unreachable `default` clause from `devtools` now, to avoid a spurious warning when the analyzer change lands. --- .../lib/src/screens/inspector_v2/inspector_data_models.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/devtools_app/lib/src/screens/inspector_v2/inspector_data_models.dart b/packages/devtools_app/lib/src/screens/inspector_v2/inspector_data_models.dart index f81658f4033..57682b1cf46 100644 --- a/packages/devtools_app/lib/src/screens/inspector_v2/inspector_data_models.dart +++ b/packages/devtools_app/lib/src/screens/inspector_v2/inspector_data_models.dart @@ -269,7 +269,6 @@ class LayoutProperties { paddingB: parentSize.height - (size.height + parentData.offset.dy), ); case SizeType.widths: - default: return ( type: type, paddingA: parentData.offset.dx,