Skip to content

Specify custom DropdownButton icons.#28670

Closed
MatthewJones517 wants to merge 1 commit intoflutter:masterfrom
MatthewJones517:custom_dropdownbutton_icons
Closed

Specify custom DropdownButton icons.#28670
MatthewJones517 wants to merge 1 commit intoflutter:masterfrom
MatthewJones517:custom_dropdownbutton_icons

Conversation

@MatthewJones517
Copy link

@MatthewJones517 MatthewJones517 commented Feb 28, 2019

Description

When defining a DropdownButton a custom icon can be specified, meaning that the default dropdown arrow no longer has to be used. Any icon can be provided to the DropdownButton as an argument.

Additionally a property called iconImage was added that allows an image to be specified for the dropdown arrow instead of an icon. This allows for more flexibility when designing forms.

If no icon or iconImage is specified, the DropdownButton defaults to the normal dropdown arrow.

Related Issues

#20686

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

When defining a DropdownButton a custom icon can be specified, meaning that the default dropdown arrow no longer has to be used. Additionally a property call iconImage was added that allows an image to be specified for the dropdown arrow instead of an icon.
@goderbauer goderbauer added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Mar 2, 2019
@shihaohong
Copy link
Contributor

Since the fix was made in #29572, I will close this PR. Thank you for your contribution!

@shihaohong shihaohong closed this Apr 4, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants