Closed ricardoboss closed 4 months ago
@darshankawar @Piinks Is the proposal alright with you? Can I try taking a stab at implementing this?
@ricardoboss Feel free to raise a PR. The team can give feedback if any while reviewing it.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Use case
I have a widget that shows a row of buttons and I want to apply an
IconTheme
to them for setting their size.Currently, I have to set the size for each icon within each button individually, because the
CupertinoButton
widget overwrites anyIconTheme
provided above it in the tree.Proposal
I'd like to propose that the
build
method in_CupertinoButtonState
usesIconTheme.of(context).copyWith(color: foregroundColor)
to set the theme instead of justIconTheme(color: foregroundColor)
.This way, it sets the correct color but also incorporates any parent styles.