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 parseFloatingActionButtonLocation() to work on desktop #3496

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

FeodorFitsner
Copy link
Contributor

@FeodorFitsner FeodorFitsner commented Jun 19, 2024

Fix #3485

Summary by Sourcery

This pull request addresses a bug in the parseFloatingActionButtonLocation() function, ensuring it correctly maps string keys to FloatingActionButtonLocation values, which resolves an issue with the function's compatibility on desktop platforms.

  • Bug Fixes:
    • Fixed parseFloatingActionButtonLocation() to correctly map string keys to FloatingActionButtonLocation values, ensuring compatibility on desktop platforms.

Copy link
Contributor

sourcery-ai bot commented Jun 19, 2024

Reviewer's Guide by Sourcery

This pull request refactors the parseFloatingActionButtonLocation() function to use a Map instead of a List for storing FloatingActionButtonLocation values. This change improves lookup performance and simplifies the error handling logic, ensuring the function works correctly on desktop platforms.

File-Level Changes

Files Changes
packages/flet/lib/src/utils/buttons.dart Refactored FloatingActionButtonLocation parsing to use a Map for improved performance and simplified error handling.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • 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 @FeodorFitsner - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 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.

packages/flet/lib/src/utils/buttons.dart Outdated Show resolved Hide resolved
packages/flet/lib/src/utils/buttons.dart Show resolved Hide resolved
packages/flet/lib/src/utils/buttons.dart Show resolved Hide resolved
FeodorFitsner and others added 2 commits June 19, 2024 15:37
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@FeodorFitsner FeodorFitsner merged commit f1c6c32 into main Jun 19, 2024
2 checks passed
@FeodorFitsner FeodorFitsner deleted the fab-location-fix branch June 19, 2024 23:32
zrr1999 pushed a commit to zrr1999/flet that referenced this pull request Jul 17, 2024
…v#3496)

* Fix parseFloatingActionButtonLocation to work on desktop

Fix flet-dev#3485

* Update changelog

* make fabLocations const

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: TheEthicalBoy <[email protected]>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
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.

Floating Action Button Location (FloatingActionButtonLocation) dont't work in v0.23
2 participants