Skip to content

Commit

Permalink
fixup! feat: improve DataSchemaValue handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Dec 29, 2023
1 parent 8756505 commit 8c62592
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/src/scripting_api/data_schema_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,20 @@ final class ObjectValue extends DataSchemaValue<Map<String, Object?>> {

return ObjectValue._fromValue(result);
}

@override
int get hashCode {
final entryList = value.entries.map((entry) => (entry.key, entry.value));

return Object.hashAll(entryList);
}

@override
bool operator ==(Object other) {
if (other is! ObjectValue) {
return false;
}

return const DeepCollectionEquality().equals(value, other.value);
}
}

0 comments on commit 8c62592

Please sign in to comment.