From 97826ec2b0b8daca53b727db162438a748373578 Mon Sep 17 00:00:00 2001 From: mohaghali Date: Sun, 1 Dec 2024 18:32:52 +0100 Subject: [PATCH] Update equality.dart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Improve compatibility with Dart’s is! operator --- packages/graphql_codegen/lib/src/printer/base/equality.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/graphql_codegen/lib/src/printer/base/equality.dart b/packages/graphql_codegen/lib/src/printer/base/equality.dart index 3b52dcd2..7e77112e 100644 --- a/packages/graphql_codegen/lib/src/printer/base/equality.dart +++ b/packages/graphql_codegen/lib/src/printer/base/equality.dart @@ -28,7 +28,7 @@ Method printEqualityOperator( ..statements = ListBuilder([ Code("if (identical(this, other)) {return true;}"), Code( - "if (!(other is ${name}) || runtimeType != other.runtimeType) {return false;}"), + "if (other is! ${name} || runtimeType != other.runtimeType) {return false;}"), ...properties.expand( (e) { final localThisName =