fix(neon): override equality operators in NeonTheme
@ -58,9 +58,7 @@ class Branding {
if (identical(this, other)) {
return true;
}
if (other.runtimeType != runtimeType) {
return false;
return other is Branding && name == other.name && logo == other.logo && legalese == other.legalese;
@ -50,9 +50,7 @@ class NeonColorScheme {
return other is NeonColorScheme && other.primary == primary;
@ -56,9 +56,7 @@ class NeonDialogTheme {
return other is NeonDialogTheme && other.constraints == constraints;
@ -55,4 +55,23 @@ class NeonTheme extends ThemeExtension<NeonTheme> {
dialogTheme: NeonDialogTheme.lerp(dialogTheme, other.dialogTheme, t),
);
@override
int get hashCode => Object.hashAll([
branding,
colorScheme,
dialogTheme,
]);
bool operator ==(final Object other) {
return other is NeonTheme &&
other.branding == branding &&
other.colorScheme == colorScheme &&
other.dialogTheme == dialogTheme;