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: adding bloc getter to FlameBlocListenable mixin #1732

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

AdrienDelgado
Copy link
Contributor

Description

This PR adds a getter to the FlameBlocListenable mixin. This getter will allow to use FlameBlocListenable as a standalone mixin to react to new states via onNewState(), access the current state, and also add events to the listenable Bloc via the bloc property.
Currently a workaround to give components this functionality is to use FlameBlocListenable and FlameBlocReader in parallel.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples.

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

Related Issues

Fixes #1694

Copy link
Member

@spydon spydon left a comment

Choose a reason for hiding this comment

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

Lgtm!

@spydon spydon requested a review from a team June 14, 2022 22:13
@spydon spydon enabled auto-merge (squash) June 15, 2022 06:12
@spydon spydon merged commit 3d19caa into flame-engine:main Jun 15, 2022
st-pasha pushed a commit to st-pasha/flame that referenced this pull request Jun 18, 2022
)

This PR adds a getter to the FlameBlocListenable mixin. This getter will allow to use FlameBlocListenable as a standalone mixin to react to new states via onNewState(), access the current state, and also add events to the listenable Bloc via the bloc property.
Currently a workaround to give components this functionality is to use FlameBlocListenable and FlameBlocReader in parallel.
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.

[flame_bloc] Expose bloc instance on FlamBlocListenable
3 participants