fix Icon alpha handling
This commit is contained in:
parent
dc4fe52532
commit
447da939b0
@ -60,10 +60,10 @@ class Icon extends StatelessComponent {
|
|||||||
if (icon == null)
|
if (icon == null)
|
||||||
return new SizedBox(width: size, height: size);
|
return new SizedBox(width: size, height: size);
|
||||||
|
|
||||||
|
final double iconOpacity = IconTheme.of(context)?.clampedOpacity ?? 1.0;
|
||||||
Color iconColor = color ?? _getDefaultColor(context);
|
Color iconColor = color ?? _getDefaultColor(context);
|
||||||
final int iconAlpha = (255.0 * (IconTheme.of(context)?.clampedOpacity ?? 1.0)).round();
|
if (iconOpacity != 1.0)
|
||||||
if (iconAlpha != 255)
|
iconColor = iconColor.withAlpha((255.0 * iconColor.opacity * iconOpacity).round());
|
||||||
iconColor = color.withAlpha((iconAlpha * color.opacity).round());
|
|
||||||
|
|
||||||
return new ExcludeSemantics(
|
return new ExcludeSemantics(
|
||||||
child: new SizedBox(
|
child: new SizedBox(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user