File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ abstract class ClosableSlideAction extends StatelessWidget {
1212 /// The [closeOnTap] argument must not be null.
1313 const ClosableSlideAction ({
1414 Key key,
15+ this .color,
1516 this .onTap,
1617 this .closeOnTap = _kCloseOnTap,
1718 }) : assert (closeOnTap != null ),
1819 super (key: key);
1920
21+ final Color color;
2022 /// A tap has occurred.
2123 final VoidCallback onTap;
2224
@@ -34,8 +36,13 @@ abstract class ClosableSlideAction extends StatelessWidget {
3436
3537 Widget build (BuildContext context) {
3638 return GestureDetector (
37- onTap: ! closeOnTap ? onTap : () => _handleCloseAfterTap (context),
38- child: buildAction (context),
39+ child: Material (
40+ color: color,
41+ child: InkWell (
42+ onTap: ! closeOnTap ? onTap : () => _handleCloseAfterTap (context),
43+ child: buildAction (context),
44+ ),
45+ ),
3946 );
4047 }
4148
@@ -116,6 +123,7 @@ class IconSlideAction extends ClosableSlideAction {
116123 'Either set icon or iconWidget.' ),
117124 super (
118125 key: key,
126+ color: color,
119127 onTap: onTap,
120128 closeOnTap: closeOnTap,
121129 );
@@ -181,7 +189,6 @@ class IconSlideAction extends ClosableSlideAction {
181189 }
182190
183191 return Container (
184- color: color,
185192 child: Center (
186193 child: Column (
187194 mainAxisSize: MainAxisSize .min,
You can’t perform that action at this time.
0 commit comments