button add null color

master
小赖 4 years ago
parent 225956cbfc
commit 89d1e665c3

@ -29,8 +29,8 @@ class AkuMaterialButton extends MaterialButton {
this.padding = EdgeInsets.zero, this.padding = EdgeInsets.zero,
@required this.child, @required this.child,
this.color = Colors.transparent, this.color = Colors.transparent,
}) : nullColor = color.withOpacity(0.5), this.nullColor = Colors.transparent,
super( }) : super(
key: key, key: key,
onPressed: onPressed, onPressed: onPressed,
elevation: elevation, elevation: elevation,
@ -46,6 +46,7 @@ class AkuMaterialButton extends MaterialButton {
), ),
child: child, child: child,
color: color, color: color,
disabledColor: nullColor,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
); );
} }