Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: #3555 #3933

Closed
wants to merge 5 commits into from
Closed

feat: #3555 #3933

wants to merge 5 commits into from

Conversation

jtdLab
Copy link

@jtdLab jtdLab commented Aug 15, 2023

Make emit of BlocBase return an Emitter which is used as an "internal" Emitter in Bloc replacing the old emit function. Inside Cubit the Emitter is used instead of the old emit function allowing easy handling of subscriptions as described in #3555.

Status

READY

Breaking Changes

These changes might be breaking for clients which override emit (happened in replay_bloc).
Else usage should be the same.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@jtdLab jtdLab requested a review from felangel as a code owner August 15, 2023 09:45
@jtdLab jtdLab changed the title Feat: #3555 feat: #3555 Aug 15, 2023
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Attention: Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.

Project coverage is 99.87%. Comparing base (d1abf0f) to head (b36f0ee).
Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
packages/bloc/lib/src/emitter.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master    #3933      +/-   ##
===========================================
- Coverage   100.00%   99.87%   -0.13%     
===========================================
  Files           31       31              
  Lines          803      807       +4     
===========================================
+ Hits           803      806       +3     
- Misses           0        1       +1     
Flag Coverage Δ
bloc 99.44% <90.90%> (-0.56%) ⬇️
replay_bloc 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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


🚨 Try these New Features:

@felangel felangel added enhancement candidate Candidate for enhancement but additional research is needed breaking change Enhancement candidate would introduce a breaking change labels Oct 14, 2023
Copy link
Owner

@felangel felangel left a comment

Choose a reason for hiding this comment

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

Unfortunately this is not sufficient because there are APIs and implementation details of the current Emitter implementation that are bloc and event handler specific. Making this work will likely involve splitting Emitter into a base Emitter and a BlocEmitter. I'm looking into this now and will hopefully have something ready to ship in the coming weeks 👍

@felangel
Copy link
Owner

Closing this for now based on my comment but happy to continue the discussion 👍
Thanks so much for taking the time to contribution -- I really appreciate it! I'll try to get this sorted out very soon!

@felangel felangel closed this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Enhancement candidate would introduce a breaking change enhancement candidate Candidate for enhancement but additional research is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants