Skip to content

Conversation

mvarendorff2
Copy link
Contributor

Connection with issue(s)

Close #1447

Solution description

The hint is only shown on an InputDecorator based on several states. One thing that has to be set for the hint to show is isEmpty: true, however this was not passed to the decorator from the dropdown field, thus always hiding the hint and label, regardless of contents.

Screenshots or Videos

Repro-Widget (boilerplate omitted for brevity):

FormBuilderDropdown(
  items: const [],
  decoration: InputDecoration(
    label: const Text('Example'),
    hintText: 'Hint is here',
  ),
)

On 10.0.1 this will not render Hint is here. With this PR it will.

To Do

  • Read contributing guide
  • Check the original issue to confirm it is fully satisfied
  • Add solution description to help guide reviewers
  • Add unit test to verify new or fixed behaviour
  • If apply, add documentation to code properties and package readme

@mvarendorff2 mvarendorff2 changed the title fix: dropdown-hint-missing #1447 fix: dropdown-hint-missing Jun 5, 2025
@mvarendorff2 mvarendorff2 changed the title #1447 fix: dropdown-hint-missing fix: #1447 dropdown-hint-missing Jun 5, 2025
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.88%. Comparing base (483f02f) to head (525f65e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1493   +/-   ##
=======================================
  Coverage   89.88%   89.88%           
=======================================
  Files          21       21           
  Lines         840      840           
=======================================
  Hits          755      755           
  Misses         85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mvarendorff2 mvarendorff2 changed the title fix: #1447 dropdown-hint-missing fix: #1447 Dropdown Hint missing Jun 5, 2025
@mvarendorff2
Copy link
Contributor Author

I just realized after the fact that there is a hint property on the FormBuilderDropdown that's supposed to be used for this. I still believe passing the correct isEmpty value is useful for other interactions with InputDecoration though, so I'll keep this open.

@deandreamatias deandreamatias merged commit 84dbb3f into flutter-form-builder-ecosystem:main Jun 9, 2025
9 of 11 checks passed
@mvarendorff2 mvarendorff2 deleted the fix/dropdown-hint-missing branch June 10, 2025 06:37
@nullsafe84
Copy link

@mvarendorff2 yes the hint label doesn't appear in the dropdown how to fix it ?

deandreamatias added a commit that referenced this pull request Jul 6, 2025
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.

Hint / Label Text Not Show on app relaunch in release
3 participants