From 8027fa7a4a5615519a1af879e19214b8a674c25d Mon Sep 17 00:00:00 2001 From: laiiihz Date: Thu, 24 Dec 2020 11:01:42 +0800 Subject: [PATCH] material button add color --- lib/buttons/as_material_button.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/buttons/as_material_button.dart b/lib/buttons/as_material_button.dart index 80991ef..83e042d 100644 --- a/lib/buttons/as_material_button.dart +++ b/lib/buttons/as_material_button.dart @@ -20,6 +20,7 @@ class ASMaterialButton extends StatelessWidget { final double radius; final Widget child; final EdgeInsets padding; + final Color color; const ASMaterialButton({ Key key, @@ -29,6 +30,7 @@ class ASMaterialButton extends StatelessWidget { @required this.child, this.radius, this.padding, + this.color, }) : super(key: key); ASMaterialButton.dropdown({ @@ -38,6 +40,7 @@ class ASMaterialButton extends StatelessWidget { @required this.child, this.radius, this.padding, + this.color, }) : icon = Icon( CupertinoIcons.chevron_down, size: 16.w, @@ -48,6 +51,7 @@ class ASMaterialButton extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialButton( + color: color, onPressed: onPressed, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, padding: padding ?? 0.edge,