diff --git a/packages/devtools_app/lib/src/screens/debugger/debugger_model.dart b/packages/devtools_app/lib/src/screens/debugger/debugger_model.dart index 9bcce888544..fc8a61b229d 100644 --- a/packages/devtools_app/lib/src/screens/debugger/debugger_model.dart +++ b/packages/devtools_app/lib/src/screens/debugger/debugger_model.dart @@ -35,7 +35,7 @@ class ScriptLocation { final SourcePosition? location; @override - bool operator ==(Object? other) { + bool operator ==(Object other) { return other is ScriptLocation && other.scriptRef == scriptRef && other.location == location; @@ -107,7 +107,7 @@ abstract class BreakpointAndSourcePosition @override int get hashCode => breakpoint.hashCode; @override - bool operator ==(Object? other) { + bool operator ==(Object other) { return other is BreakpointAndSourcePosition && other.breakpoint == breakpoint; } diff --git a/packages/devtools_app/lib/src/screens/network/network_model.dart b/packages/devtools_app/lib/src/screens/network/network_model.dart index 5bdd668ebc6..61bd8e6147a 100644 --- a/packages/devtools_app/lib/src/screens/network/network_model.dart +++ b/packages/devtools_app/lib/src/screens/network/network_model.dart @@ -61,7 +61,7 @@ abstract class NetworkRequest with SearchableDataMixin { String toString() => '$method $uri'; @override - bool operator ==(Object? other) { + bool operator ==(Object other) { return other is NetworkRequest && runtimeType == other.runtimeType && startTimestamp == other.startTimestamp && @@ -174,7 +174,7 @@ class WebSocket extends NetworkRequest { bool get inProgress => false; @override - bool operator ==(Object? other) => other is WebSocket && id == other.id; + bool operator ==(Object other) => other is WebSocket && id == other.id; @override int get hashCode => id.hashCode; diff --git a/packages/devtools_app/lib/src/shared/charts/flame_chart.dart b/packages/devtools_app/lib/src/shared/charts/flame_chart.dart index 5041061e949..f3987367333 100644 --- a/packages/devtools_app/lib/src/shared/charts/flame_chart.dart +++ b/packages/devtools_app/lib/src/shared/charts/flame_chart.dart @@ -1443,8 +1443,7 @@ class TimelineGridPainter extends FlameChartPainter { bool shouldRepaint(CustomPainter oldDelegate) => this != oldDelegate; @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { if (other is! TimelineGridPainter) return false; return zoom == other.zoom && constraints == other.constraints && diff --git a/packages/devtools_app/lib/src/shared/diagnostics/primitives/source_location.dart b/packages/devtools_app/lib/src/shared/diagnostics/primitives/source_location.dart index 24eef08f36e..7fb7cb9a2b4 100644 --- a/packages/devtools_app/lib/src/shared/diagnostics/primitives/source_location.dart +++ b/packages/devtools_app/lib/src/shared/diagnostics/primitives/source_location.dart @@ -57,8 +57,7 @@ class SourcePosition { final int? tokenPos; @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { return other is SourcePosition && other.line == line && other.column == column && diff --git a/packages/devtools_app/lib/src/shared/http/http_request_data.dart b/packages/devtools_app/lib/src/shared/http/http_request_data.dart index 0dd1ba52c30..e424bad6baf 100644 --- a/packages/devtools_app/lib/src/shared/http/http_request_data.dart +++ b/packages/devtools_app/lib/src/shared/http/http_request_data.dart @@ -321,8 +321,7 @@ class DartIOHttpRequestData extends NetworkRequest { } @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { return other is DartIOHttpRequestData && id == other.id && super == other; } diff --git a/packages/devtools_app/lib/src/shared/primitives/trace_event.dart b/packages/devtools_app/lib/src/shared/primitives/trace_event.dart index d42bccb99df..876e37c7f3f 100644 --- a/packages/devtools_app/lib/src/shared/primitives/trace_event.dart +++ b/packages/devtools_app/lib/src/shared/primitives/trace_event.dart @@ -191,8 +191,7 @@ class ThreadNameEvent { final int? threadId; @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { return other is ThreadNameEvent && name == other.name && threadId == other.threadId; diff --git a/packages/devtools_app/lib/src/shared/primitives/utils.dart b/packages/devtools_app/lib/src/shared/primitives/utils.dart index b14cffeffe9..e59eb4dd37e 100644 --- a/packages/devtools_app/lib/src/shared/primitives/utils.dart +++ b/packages/devtools_app/lib/src/shared/primitives/utils.dart @@ -605,8 +605,7 @@ class TimeRange { } @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { if (other is! TimeRange) return false; return start == other.start && end == other.end; } @@ -749,8 +748,7 @@ class Range { String toString() => 'Range($begin, $end)'; @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { if (other is! Range) return false; return begin == other.begin && end == other.end; } @@ -779,8 +777,7 @@ class LineRange { String toString() => 'LineRange($begin, $end)'; @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { if (other is! LineRange) return false; return begin == other.begin && end == other.end; } diff --git a/packages/devtools_app/test/primitives/utils_test.dart b/packages/devtools_app/test/primitives/utils_test.dart index 06dd79ea552..0da31059b5c 100644 --- a/packages/devtools_app/test/primitives/utils_test.dart +++ b/packages/devtools_app/test/primitives/utils_test.dart @@ -1458,7 +1458,7 @@ class _SubtractionResult { final double? from; @override - bool operator ==(Object? other) { + bool operator ==(Object other) { if (other.runtimeType != runtimeType) { return false; } diff --git a/packages/devtools_app/test/test_infra/goldens/syntax_highlighting/keywords.dart.golden b/packages/devtools_app/test/test_infra/goldens/syntax_highlighting/keywords.dart.golden index bfcd6bdfaf4..81b65d6fb4e 100644 --- a/packages/devtools_app/test/test_infra/goldens/syntax_highlighting/keywords.dart.golden +++ b/packages/devtools_app/test/test_infra/goldens/syntax_highlighting/keywords.dart.golden @@ -91,10 +91,11 @@ > > @override # ^^^^^^^^^ storage.type.annotation.dart -> bool operator ==(other) { +> bool operator ==(Object other) { # ^^^^ support.class.dart # ^^^^^^^^ keyword.declaration.dart # ^^ keyword.operator.comparison.dart +# ^^^^^^ support.class.dart > return false; # ^^^^^^ keyword.control.dart # ^^^^^ constant.language.dart diff --git a/packages/devtools_app/test/test_infra/test_data/syntax_highlighting/keywords.dart b/packages/devtools_app/test/test_infra/test_data/syntax_highlighting/keywords.dart index 6da845e19e5..65a35745379 100644 --- a/packages/devtools_app/test/test_infra/test_data/syntax_highlighting/keywords.dart +++ b/packages/devtools_app/test/test_infra/test_data/syntax_highlighting/keywords.dart @@ -24,7 +24,7 @@ class B extends A { set foo(String value) {} @override - bool operator ==(other) { + bool operator ==(Object other) { return false; } } diff --git a/packages/devtools_app_shared/lib/src/service/flutter_version.dart b/packages/devtools_app_shared/lib/src/service/flutter_version.dart index 824325f473b..6f9a32dfc9a 100644 --- a/packages/devtools_app_shared/lib/src/service/flutter_version.dart +++ b/packages/devtools_app_shared/lib/src/service/flutter_version.dart @@ -58,8 +58,7 @@ final class FlutterVersion extends SemanticVersion { final SemanticVersion? dartSdkVersion; @override - // ignore: avoid-dynamic, necessary here. - bool operator ==(other) { + bool operator ==(Object other) { if (other is! FlutterVersion) return false; return version == other.version && channel == other.channel && diff --git a/packages/devtools_app_shared/lib/src/service/service_manager.dart b/packages/devtools_app_shared/lib/src/service/service_manager.dart index dc006ecc8ec..fa619dbdf36 100644 --- a/packages/devtools_app_shared/lib/src/service/service_manager.dart +++ b/packages/devtools_app_shared/lib/src/service/service_manager.dart @@ -457,7 +457,7 @@ class ConnectedState { final bool userInitiatedConnectionState; @override - bool operator ==(Object? other) { + bool operator ==(Object other) { return other is ConnectedState && other.connected == connected && other.userInitiatedConnectionState == userInitiatedConnectionState; diff --git a/packages/devtools_shared/lib/src/extensions/extension_model.dart b/packages/devtools_shared/lib/src/extensions/extension_model.dart index d07cc5010a8..6f66841829f 100644 --- a/packages/devtools_shared/lib/src/extensions/extension_model.dart +++ b/packages/devtools_shared/lib/src/extensions/extension_model.dart @@ -165,7 +165,7 @@ class DevToolsExtensionConfig implements Comparable { } @override - bool operator ==(Object? other) { + bool operator ==(Object other) { return other is DevToolsExtensionConfig && other.name == name && other.path == path &&