buildButton method
Implementation
Widget buildButton() {
if (plain!) {
return OutlinedButton(
style: style ??
OutlinedButton.styleFrom(
padding: padding,
foregroundColor: color,
side: BorderSide(
color: color ?? CommonColors.theme,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(radius),
),
),
onPressed: disable
? null
: () {
onPressed?.call();
}.throttle(),
child: child,
);
}
return FilledButton(
style: style ??
FilledButton.styleFrom(
padding: padding,
backgroundColor: color,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(radius),
),
),
onPressed: disable
? null
: () {
onPressed?.call();
}.throttle(),
child: child,
);
}