|
|
|
|
@ -8,6 +8,7 @@ class AppFilledButton extends StatelessWidget {
|
|
|
|
|
final VoidCallback? onPressed;
|
|
|
|
|
final String label;
|
|
|
|
|
final bool maxWidth, loading;
|
|
|
|
|
final double? fontSize;
|
|
|
|
|
final bool showIcon;
|
|
|
|
|
final Widget? icon;
|
|
|
|
|
final Color? buttonColor;
|
|
|
|
|
@ -15,7 +16,17 @@ class AppFilledButton extends StatelessWidget {
|
|
|
|
|
final bool showBorder;
|
|
|
|
|
|
|
|
|
|
const AppFilledButton(
|
|
|
|
|
{this.onPressed, required this.label, this.maxWidth = false, this.showIcon = false, this.icon, this.loading = false, this.showBorder = false, this.buttonColor, this.textColor, Key? key})
|
|
|
|
|
{this.onPressed,
|
|
|
|
|
required this.label,
|
|
|
|
|
this.maxWidth = false,
|
|
|
|
|
this.showIcon = false,
|
|
|
|
|
this.icon,
|
|
|
|
|
this.fontSize,
|
|
|
|
|
this.loading = false,
|
|
|
|
|
this.showBorder = false,
|
|
|
|
|
this.buttonColor,
|
|
|
|
|
this.textColor,
|
|
|
|
|
Key? key})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@ -39,14 +50,16 @@ class AppFilledButton extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: showIcon && icon != null
|
|
|
|
|
? Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
? Row(mainAxisAlignment: MainAxisAlignment.center, children: [
|
|
|
|
|
icon!,
|
|
|
|
|
8.width,
|
|
|
|
|
label.heading6(context).custom(color: textColor ?? AppColor.background(context)),
|
|
|
|
|
])
|
|
|
|
|
: label.heading6(context).custom(color: textColor ?? AppColor.background(context)),
|
|
|
|
|
: label.heading6(context).custom(
|
|
|
|
|
color: textColor ?? AppColor.background(context),
|
|
|
|
|
align: TextAlign.center,
|
|
|
|
|
fontSize: fontSize ?? 16.toScreenWidth,
|
|
|
|
|
),
|
|
|
|
|
).onPress(onPressed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|