Open
Description
Revealed from #1293
Background
SvgIcons
have concrete colors, so when there is need for colors different than hard-coded one, we have to add a copy of .svg
file to the project.
Problem to solve
- Inability to use colors from app theme for consistency in design
- Inability to specify a common color for all icons in a certain widget sub-tree
- Inability to dynamically change icon color in runtime
- Unnecessary copies of
.svg
files that leads to big app size and high memory usage
Possible solutions
SvgIcons
should act like MaterialIcons
:
- Be tinted to color specified in it's
SvgIcon
widget property - Use
IconTheme
as a backdrop color
We could add color
field to SvgIcon
and wrap it with ColorFiltered
widget. Then, we can move colors specified in .svg
files to app theme, IconTheme
above SvgIcon
or color
field of specific icons. And finally, remove color tinted SvgIcon
s and keep only white tinted versions.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Bugs