-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Implement a way to opt-out colorization in ImageIcon #22074
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
Conversation
|
Unfortunately, the same issue exists with ImageIcon's width, height, and opacity parameters. I don't think we'd want to gradually introduce overrides for them, since ImageIcon really doesn't do very much. It might be simpler to just use Image directly, if the Semantics(
label: mySemanticLabel,
child: Image(
image: myImage,
width: myIconSize,
height: myIconSize,
fit: BoxFit.scaleDown,
alignment: Alignment.center,
excludeFromSemantics: true,
),
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name isn't immediately clear (should recolor what? to what?).
How about honorIconThemeColor or ignoreIconThemeColor or some such?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we definitely shouldn't use an Opacity to change the opacity of an image. See the docs for Opacity for an alternative way to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the previous state of this test represents what we actually want the behaviour to be for optimal performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this test title may be backwards? it doesn't seem to match the test
|
This is great, thanks for your contribution! |
1f5eccb to
d066a1a
Compare
|
@NikoYuwono Are you interested in continuing to work on this? |
|
@NikoYuwono Are you still planning to come back to this? |
|
Closing this for now as the PR has been open for over a month without action. The issue this is fixing is tracked in #11593. |
Fix #11593
Add a flag to give user a way to opt-out colorization in ImageIcon.
Defaults to true to match current behaviour.
Change the opacity handling with Opacity widget to able to handle opacity when shouldRecolor is false.