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

fix: SpriteButtonComponent to initialize sprites in onLoad #3302

Merged

Conversation

puneet-739
Copy link
Contributor

Description

Just replaced the null check operator ! with null aware ?.
void updateSprite(T key, Sprite sprite) {
_sprites?[key] = sprite;
_resizeToSprite();
}
the value of _sprites set on the mount() method of the SpriteButtonComponent class

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • 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 or docs.

Breaking Change?

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

Related Issues

#3293

@puneet-739 puneet-739 changed the title fix: SpriteButtonComponent null check issue. fix: SpriteButtonComponent null check issue. Sep 13, 2024
@spydon spydon changed the title fix: SpriteButtonComponent null check issue. fix: SpriteButtonComponent null check issue Sep 15, 2024
@spydon spydon enabled auto-merge (squash) September 20, 2024 20:06
@spydon spydon changed the title fix: SpriteButtonComponent null check issue fix: SpriteButtonComponent to initialize sprites in onLoad Sep 20, 2024
@spydon spydon enabled auto-merge (squash) September 20, 2024 20:07
@spydon spydon merged commit 1204216 into flame-engine:main Sep 20, 2024
9 checks passed
@puneet-739 puneet-739 deleted the sprite-button-component-issue-fix branch October 4, 2024 14:40
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.

2 participants