getButton method
Implementation
Widget getButton() {
if (!enabled) {
return FilledButton(
onPressed: null,
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.all(SepteoColors.grey.shade200),
foregroundColor:
WidgetStateProperty.all(SepteoColors.grey.shade400),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(SepteoSpacings.xs),
),
),
),
child: getContent());
}
return switch (style) {
ButtonType.primary => FilledButton(
onPressed: onPressed,
style: ButtonStyles.primary,
child: getContent(),
),
ButtonType.secondary => OutlinedButton(
onPressed: onPressed,
style: ButtonStyles.secondary,
child: getContent(),
),
};
}