Skip to content

fix: preserve tags and custom fields in metadata#465

Open
nogringo wants to merge 12 commits intomasterfrom
fix/metadata-preserve-tags-and-custom-fields
Open

fix: preserve tags and custom fields in metadata#465
nogringo wants to merge 12 commits intomasterfrom
fix/metadata-preserve-tags-and-custom-fields

Conversation

@nogringo
Copy link
Collaborator

  • Add tags field to Metadata entity
  • Add rawContent field to preserve original JSON
  • Update fromEvent() to store tags and rawContent
  • Update toEvent() to merge with original JSON
  • Add helper methods setCustomField() and getCustomField()
  • Fix constructor to use mutable list for tags

Fixes #438

  - Add tags field to Metadata entity
  - Add rawContent field to preserve original JSON
  - Update fromEvent() to store tags and rawContent
  - Update toEvent() to merge with original JSON
  - Add helper methods setCustomField() and getCustomField()
  - Fix constructor to use mutable list for tags

  Fixes #438
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 92.98246% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.41%. Comparing base (121325c) to head (06e1d6c).
⚠️ Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
...ckages/ndk/lib/domain_layer/entities/metadata.dart 92.92% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #465      +/-   ##
==========================================
+ Coverage   76.01%   76.41%   +0.39%     
==========================================
  Files         152      152              
  Lines        6204     6291      +87     
==========================================
+ Hits         4716     4807      +91     
+ Misses       1488     1484       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nogringo nogringo requested review from 1-leo and frnandu February 24, 2026 14:43
Copy link
Contributor

@1-leo 1-leo left a comment

Choose a reason for hiding this comment

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

String? get name => content['name'] as String?;
getters are executed every time, because metadata is access frequently this could add up.
Can we cache them? Acessing custom properties should still be possible

@nogringo nogringo requested a review from 1-leo February 25, 2026 13:10
@nogringo
Copy link
Collaborator Author

Should we update toJson and fromJson ? It will be a braking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

metadata does not store tags/custom content fields

2 participants