button add null color

master
小赖 4 years ago
parent e57b6920e4
commit 225956cbfc

@ -12,6 +12,7 @@ class AkuMaterialButton extends MaterialButton {
final double radius; final double radius;
final EdgeInsets padding; final EdgeInsets padding;
final Color color; final Color color;
final Color nullColor;
final Widget child; final Widget child;
AkuMaterialButton({ AkuMaterialButton({
@ -28,7 +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,
}) : super( }) : nullColor = color.withOpacity(0.5),
super(
key: key, key: key,
onPressed: onPressed, onPressed: onPressed,
elevation: elevation, elevation: elevation,