Skip to content

Commit

Permalink
Update equality.dart (#373)
Browse files Browse the repository at this point in the history
Improve compatibility with Dart’s is! operator
  • Loading branch information
mohagali authored Dec 1, 2024
1 parent b77b65e commit b43b7ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit b43b7ab

Please sign in to comment.