add content padding property to SecondaryButton

This commit is contained in:
julian 2023-04-03 17:00:08 -06:00
parent a9306e5267
commit f10db8306a

View file

@ -18,6 +18,7 @@ class SecondaryButton extends StatelessWidget {
this.enabled = true,
this.buttonHeight,
this.iconSpacing = 10,
this.padding = EdgeInsets.zero,
}) : super(key: key);
final double? width;
@ -29,6 +30,7 @@ class SecondaryButton extends StatelessWidget {
final Widget? trailingIcon;
final ButtonHeight? buttonHeight;
final double iconSpacing;
final EdgeInsets padding;
TextStyle getStyle(bool isDesktop, BuildContext context) {
if (isDesktop) {
@ -155,6 +157,8 @@ class SecondaryButton extends StatelessWidget {
: Theme.of(context)
.extension<StackColors>()!
.getSecondaryDisabledButtonStyle(context),
child: Padding(
padding: padding,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -188,6 +192,7 @@ class SecondaryButton extends StatelessWidget {
],
),
),
),
);
}
}