feat: add equality and hashCode overrides for autogenerated models (BREAKING CHANGE)

This commit is contained in:
td 2024-10-18 14:02:55 +02:00
parent ecbcc5f6fe
commit b2e747bb3a
No known key found for this signature in database
GPG Key ID: 62A30523D4D6CE28
7 changed files with 1234 additions and 8 deletions

View File

@ -1,2 +1,2 @@
flutter_version=3.22.2 flutter_version=3.24.3
dart_version=3.5.3 dart_version=3.5.3

File diff suppressed because it is too large Load Diff

View File

@ -456,10 +456,10 @@ class LiveKitBackend extends CallBackend {
@override @override
bool operator ==(Object other) => bool operator ==(Object other) =>
identical(this, other) || identical(this, other) ||
other is LiveKitBackend && (other is LiveKitBackend &&
type == other.type && type == other.type &&
livekitServiceUrl == other.livekitServiceUrl && livekitServiceUrl == other.livekitServiceUrl &&
livekitAlias == other.livekitAlias; livekitAlias == other.livekitAlias);
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(

View File

@ -843,7 +843,7 @@ class MeshBackend extends CallBackend {
@override @override
bool operator ==(Object other) => bool operator ==(Object other) =>
identical(this, other) || other is MeshBackend && type == other.type; identical(this, other) || (other is MeshBackend && type == other.type);
@override @override
int get hashCode => type.hashCode; int get hashCode => type.hashCode;

View File

@ -30,9 +30,9 @@ class CallParticipant {
@override @override
bool operator ==(Object other) => bool operator ==(Object other) =>
identical(this, other) || identical(this, other) ||
other is CallParticipant && (other is CallParticipant &&
userId == other.userId && userId == other.userId &&
deviceId == other.deviceId; deviceId == other.deviceId);
@override @override
int get hashCode => Object.hash(userId.hashCode, deviceId.hashCode); int get hashCode => Object.hash(userId.hashCode, deviceId.hashCode);

View File

@ -17,7 +17,7 @@ class VoipId {
@override @override
bool operator ==(Object other) => bool operator ==(Object other) =>
identical(this, other) || identical(this, other) ||
other is VoipId && roomId == other.roomId && callId == other.callId; (other is VoipId && roomId == other.roomId && callId == other.callId);
@override @override
int get hashCode => Object.hash(roomId.hashCode, callId.hashCode); int get hashCode => Object.hash(roomId.hashCode, callId.hashCode);

View File

@ -35,7 +35,7 @@ dependencies:
webrtc_interface: ^1.2.0 webrtc_interface: ^1.2.0
dev_dependencies: dev_dependencies:
build_runner: ^2.4.8 build_runner: ^2.4.13
coverage: ">=0.15.0 <2.0.0" coverage: ">=0.15.0 <2.0.0"
enhanced_enum_generator: ^0.2.4 enhanced_enum_generator: ^0.2.4
file: ">=6.1.1 <8.0.0" file: ">=6.1.1 <8.0.0"