File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ class IconSlideAction extends ClosableSlideAction {
104104 @required this .icon,
105105 this .caption,
106106 Color color,
107+ this .foregroundColor,
107108 VoidCallback onTap,
108109 bool closeOnTap = _kCloseOnTap,
109110 }) : color = color ?? Colors .white,
@@ -122,9 +123,11 @@ class IconSlideAction extends ClosableSlideAction {
122123 /// Defaults to true.
123124 final Color color;
124125
126+ final Color foregroundColor;
127+
125128 @override
126129 Widget buildAction (BuildContext context) {
127- final Color foregroundColor =
130+ final Color estimatedColor =
128131 ThemeData .estimateBrightnessForColor (color) == Brightness .light
129132 ? Colors .black
130133 : Colors .white;
@@ -134,7 +137,7 @@ class IconSlideAction extends ClosableSlideAction {
134137 style: Theme .of (context)
135138 .primaryTextTheme
136139 .caption
137- .copyWith (color: foregroundColor),
140+ .copyWith (color: foregroundColor ?? estimatedColor ),
138141 );
139142 return Container (
140143 color: color,
@@ -145,7 +148,7 @@ class IconSlideAction extends ClosableSlideAction {
145148 new Flexible (
146149 child: new Icon (
147150 icon,
148- color: foregroundColor,
151+ color: foregroundColor ?? estimatedColor ,
149152 ),
150153 ),
151154 new Flexible (child: textWidget),
You can’t perform that action at this time.
0 commit comments