Skip to content

Conversation

@tarrinneal
Copy link
Contributor

@tarrinneal tarrinneal commented Mar 4, 2025

Adds Equality and Hash methods to custom classes in Dart.
I am still working on other languages, but this can be a standalone pr while I complete the others.

fixes flutter/flutter#118087

@tarrinneal tarrinneal marked this pull request as ready for review March 5, 2025 01:24
@tarrinneal
Copy link
Contributor Author

I didn't quite do what you requested, but I did something.

@tarrinneal tarrinneal changed the title [pigeon] Class Equality [pigeon] Dart Class Equality Mar 17, 2025
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

bool _deepEquals(Object? a, Object? b) {
if (a is List && b is List) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of the record+pattern approach, eh? ;)

bool _deepEquals(Object? a, Object? b) {
if (a is List && b is List) {
return a.length == b.length &&
a.indexed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I forgot indexed was a thing.

@tarrinneal tarrinneal added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 19, 2025
@auto-submit auto-submit bot merged commit cf9b0f2 into flutter:main Mar 20, 2025
82 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 20, 2025
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
Adds Equality and Hash methods to custom classes in Dart.
I am still working on other languages, but this can be a standalone pr while I complete the others.

fixes flutter/flutter#118087
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
Adds Equality and Hash methods to custom classes in Dart.
I am still working on other languages, but this can be a standalone pr while I complete the others.

fixes flutter/flutter#118087
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: pigeon platform-ios platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto generate equals/hash on pigeon generated classes

3 participants