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

Implement TextField.counter property #3676

Merged
merged 2 commits into from
Aug 5, 2024
Merged

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Jul 20, 2024

Fixes #3656

Summary by Sourcery

This pull request adds a new counter property to the TextField and Dropdown components, allowing for the display of a counter control. The buildInputDecoration function has been updated to support this new property.

  • New Features:
    • Introduced the counter property to the TextField and Dropdown components, allowing for the display of a counter control.
  • Enhancements:
    • Updated the buildInputDecoration function to support the new counter property, enabling the inclusion of a counter control in the input decoration.

Copy link
Contributor

sourcery-ai bot commented Jul 20, 2024

Reviewer's Guide by Sourcery

This pull request implements the TextField.counter property by adding support for a counter control in various components. The changes include filtering for counter controls, updating the buildInputDecoration function to handle the counter parameter, and adding the counter parameter to constructors and relevant methods in the Python SDK.

File-Level Changes

Files Changes
packages/flet/lib/src/controls/dropdown.dart
packages/flet/lib/src/controls/textfield.dart
Added counterControls to filter controls with the name 'counter' and updated buildInputDecoration calls to include the counter parameter.
sdk/python/packages/flet-core/src/flet_core/form_field_control.py
sdk/python/packages/flet-core/src/flet_core/dropdown.py
sdk/python/packages/flet-core/src/flet_core/textfield.py
Added counter parameter to constructors and updated methods to handle counter control.

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: 7 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.

@FeodorFitsner FeodorFitsner merged commit cf9ad4c into main Aug 5, 2024
2 checks passed
@ndonkoHenri ndonkoHenri deleted the textfield-counter-control branch August 17, 2024 16:08
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.

custom counter_text of TextField
2 participants