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: Don't use a future when assets for SpriteButton is already loaded #3456

Merged
merged 4 commits into from
Jan 26, 2025

Conversation

spydon
Copy link
Member

@spydon spydon commented Jan 22, 2025

Description

When both images are already loaded and we're using a future it will go into loading for one tick, with this PR we avoid that.

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

@spydon spydon requested a review from erickzanardo January 22, 2025 17:00
Copy link
Contributor

github-actions bot commented Jan 22, 2025

Benchmark Results

Package flame:

Benchmarks Current Branch
[fix/assets-for-button-already-loaded]
Base Branch
[main]
Diff
Render Components Benchmark 1183.385 μs 1184.374 μs 🟢 -0.083 %
Updating Components Benchmark 265054.250 μs 263449.250 μs 🔴 +0.609 %

Benchmarks provided with 💙 by Dart Benchmark Action.

@spydon spydon merged commit 324ac2b into main Jan 26, 2025
9 checks passed
@spydon spydon deleted the fix/assets-for-button-already-loaded branch January 26, 2025 15:47
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