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(regression): Setting Image.src_base64 returns ErrorControl #3919

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Sep 2, 2024

Description

Fixes #3909

Summary by Sourcery

Fix the regression that caused setting Image.src.base64 to return an error by ensuring the image is returned upon successful decoding.

Bug Fixes:

  • Fix the issue where setting Image.src.base64 incorrectly returns ErrorControl by ensuring the image is returned when successfully decoded.

Copy link
Contributor

sourcery-ai bot commented Sep 2, 2024

Reviewer's Guide by Sourcery

This pull request fixes a regression issue where setting Image.src.base64 was returning an ErrorControl instead of the expected image. The changes involve modifying the buildImage function in the box.dart file to correctly handle base64-encoded images and improve error messaging.

File-Level Changes

Change Details Files
Fix base64 image handling in buildImage function
  • Add early return for successfully decoded base64 images
  • Update error message for invalid or missing image source
packages/flet/lib/src/utils/box.dart

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ndonkoHenri - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@FeodorFitsner FeodorFitsner merged commit 1a2ac5f into main Sep 2, 2024
3 checks passed
@FeodorFitsner FeodorFitsner deleted the fix-image-srcbase64 branch September 2, 2024 14:53
@ndonkoHenri ndonkoHenri changed the title fix(regression): Setting Image.src.base64 returns ErrorControl fix(regression): Setting Image.src_base64 returns ErrorControl Sep 2, 2024
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.

Image src_base64 no more working
2 participants