Skip to content

Commit

Permalink
Avoid expanding the parameter type of operator==
Browse files Browse the repository at this point in the history
Object.operator== takes an `Object`, and no Dart runtime passes a `null` value to an `==` implementation. SvgTheme's implementation should not have an expanded parameter type of `dynamic`.

See flutter/flutter#117838 for the overarching issue for Flutter.
  • Loading branch information
srawlins authored Dec 5, 2023
1 parent 20932e2 commit 3459bab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flutter_svg/lib/src/loaders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SvgTheme {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
if (other.runtimeType != runtimeType) {
return false;
}
Expand Down

0 comments on commit 3459bab

Please sign in to comment.