Skip to content

Commit

Permalink
Avoid expanding the parameter type of operator== (#1017)
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.

Co-authored-by: Dan Field <dnfield@google.com>
  • Loading branch information
srawlins and dnfield committed Dec 5, 2023
1 parent 1a33cbd commit a3911bb
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 a3911bb

Please sign in to comment.