Skip to content

fix: Initialize center offset in CircleComponent ctor#3842

Merged
spydon merged 2 commits intomainfrom
devkage/circle-component-center-offset-ini
Mar 5, 2026
Merged

fix: Initialize center offset in CircleComponent ctor#3842
spydon merged 2 commits intomainfrom
devkage/circle-component-center-offset-ini

Conversation

@ufrshubham
Copy link
Member

Description

This PR moves the initialization (and the size-change listener) from onLoad into the constructor body, so _centerOffset is available as soon as the component is constructed — regardless of whether it has gone through the normal
component lifecycle.

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • [NA] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [NA] I have updated/added relevant examples in examples or docs.

Breaking Change?

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

Related Issues

Closes #2962

@ufrshubham ufrshubham self-assigned this Mar 5, 2026
@ufrshubham ufrshubham changed the title feat: Initialize center offset in CircleComponent ctor fix: Initialize center offset in CircleComponent ctor Mar 5, 2026
@ufrshubham ufrshubham requested a review from a team March 5, 2026 08:42
@spydon spydon merged commit a0d2a5f into main Mar 5, 2026
68 checks passed
@spydon spydon deleted the devkage/circle-component-center-offset-ini branch March 5, 2026 09:03
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.

ComponentParticle fails with CircleComponent

2 participants