From a3911bb074c49b821bb9beaa349ee04ac9f4e2f7 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 5 Dec 2023 13:49:41 -0800 Subject: [PATCH] Avoid expanding the parameter type of operator== (#1017) 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 https://github.com/flutter/flutter/issues/117838 for the overarching issue for Flutter. Co-authored-by: Dan Field --- packages/flutter_svg/lib/src/loaders.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_svg/lib/src/loaders.dart b/packages/flutter_svg/lib/src/loaders.dart index 0c9931d0..ac781ef5 100644 --- a/packages/flutter_svg/lib/src/loaders.dart +++ b/packages/flutter_svg/lib/src/loaders.dart @@ -54,7 +54,7 @@ class SvgTheme { } @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (other.runtimeType != runtimeType) { return false; }