[material_ui] Fix DropdownMenuFormField missing leading icon - #12759
Open
haashem wants to merge 2 commits into
Open
[material_ui] Fix DropdownMenuFormField missing leading icon#12759haashem wants to merge 2 commits into
DropdownMenuFormField missing leading icon#12759haashem wants to merge 2 commits into
Conversation
Apply the leadingIcon fallback for custom decorations, add regression coverage, and record the patch release changelog.
Contributor
There was a problem hiding this comment.
Code Review
This pull request ensures that DropdownMenuFormField.leadingIcon is displayed in the text field by assigning it as the prefix icon when InputDecoration.prefixIcon is null. It also adds documentation and a widget test to verify this behavior. The feedback suggests optimizing performance by checking if widget.leadingIcon is non-null before calling copyWith to avoid unnecessary InputDecoration allocations.
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a regression where DropdownMenuFormField.leadingIcon was not shown in the field.
DropdownMenuFormField took a leadingIcon, but didn’t actually show it in the field. This change makes it behave like trailingIcon, so the leading icon now shows up as the default prefix icon.
Fixes flutter/flutter#185416
With only leadingIcon

decorationBuilder has higher priority than leading icon.

Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2