|
|
@ -20,6 +20,7 @@ class ASMaterialButton extends StatelessWidget {
|
|
|
|
final double radius;
|
|
|
|
final double radius;
|
|
|
|
final Widget child;
|
|
|
|
final Widget child;
|
|
|
|
final EdgeInsets padding;
|
|
|
|
final EdgeInsets padding;
|
|
|
|
|
|
|
|
final Color color;
|
|
|
|
|
|
|
|
|
|
|
|
const ASMaterialButton({
|
|
|
|
const ASMaterialButton({
|
|
|
|
Key key,
|
|
|
|
Key key,
|
|
|
@ -29,6 +30,7 @@ class ASMaterialButton extends StatelessWidget {
|
|
|
|
@required this.child,
|
|
|
|
@required this.child,
|
|
|
|
this.radius,
|
|
|
|
this.radius,
|
|
|
|
this.padding,
|
|
|
|
this.padding,
|
|
|
|
|
|
|
|
this.color,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
ASMaterialButton.dropdown({
|
|
|
|
ASMaterialButton.dropdown({
|
|
|
@ -38,6 +40,7 @@ class ASMaterialButton extends StatelessWidget {
|
|
|
|
@required this.child,
|
|
|
|
@required this.child,
|
|
|
|
this.radius,
|
|
|
|
this.radius,
|
|
|
|
this.padding,
|
|
|
|
this.padding,
|
|
|
|
|
|
|
|
this.color,
|
|
|
|
}) : icon = Icon(
|
|
|
|
}) : icon = Icon(
|
|
|
|
CupertinoIcons.chevron_down,
|
|
|
|
CupertinoIcons.chevron_down,
|
|
|
|
size: 16.w,
|
|
|
|
size: 16.w,
|
|
|
@ -48,6 +51,7 @@ class ASMaterialButton extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return MaterialButton(
|
|
|
|
return MaterialButton(
|
|
|
|
|
|
|
|
color: color,
|
|
|
|
onPressed: onPressed,
|
|
|
|
onPressed: onPressed,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
padding: padding ?? 0.edge,
|
|
|
|
padding: padding ?? 0.edge,
|
|
|
|