Skip to content

Commit

Permalink
InputDevice class equality operator update (#294)
Browse files Browse the repository at this point in the history
Co-authored-by: Melih Hakan Pektas <[email protected]>
  • Loading branch information
melihhakanpektas and Melih Hakan Pektas authored Apr 25, 2024
1 parent 8cbe4ce commit edf9fe5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions record_platform_interface/lib/src/types/input_device.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,14 @@ class InputDevice {
label: $label
''';
}

@override
bool operator ==(Object other) {
if (identical(this, other)) return true;

return other is InputDevice && other.id == id && other.label == label;
}

@override
int get hashCode => id.hashCode ^ label.hashCode;
}

0 comments on commit edf9fe5

Please sign in to comment.