You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/03/31 20:46:07 UTC

[GitHub] [beam] KonradJanica commented on a change in pull request #17226: [BEAM-14204] [Playground] Tests for example repository

KonradJanica commented on a change in pull request #17226:
URL: https://github.com/apache/beam/pull/17226#discussion_r840003063



##########
File path: playground/frontend/lib/modules/examples/repositories/models/get_list_of_examples_request.dart
##########
@@ -23,4 +23,14 @@ class GetListOfExamplesRequestWrapper {
   final String? category;
 
   GetListOfExamplesRequestWrapper({required this.sdk, required this.category});
+
+  @override
+  bool operator ==(Object other) =>
+      identical(this, other) ||
+          other is GetListOfExamplesRequestWrapper &&
+              category == other.category &&
+              sdk == other.sdk;
+
+  @override
+  int get hashCode => category.hashCode ^ sdk.hashCode;

Review comment:
       Nit: Flutter has the [hashValues](https://api.flutter.dev/flutter/dart-ui/hashValues.html) function which is more standard.

##########
File path: playground/frontend/lib/modules/examples/repositories/models/get_example_request.dart
##########
@@ -23,4 +23,14 @@ class GetExampleRequestWrapper {
   final SDK sdk;
 
   GetExampleRequestWrapper(this.path, this.sdk);
+
+  @override
+  bool operator ==(Object other) =>
+      identical(this, other) ||
+      other is GetExampleRequestWrapper &&
+          path == other.path &&
+          sdk == other.sdk;
+
+  @override
+  int get hashCode => path.hashCode ^ sdk.hashCode;

Review comment:
       Nit: Flutter has the [hashValues](https://api.flutter.dev/flutter/dart-ui/hashValues.html) function which is more standard.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org