buildButtonStyle static method

ButtonStyle buildButtonStyle(
  1. TWidgetTheme baseTheme,
  2. TButtonShape shape,
  3. TButtonSize size
)

Implementation

static ButtonStyle buildButtonStyle(TWidgetTheme baseTheme, TButtonShape shape, TButtonSize size) {
  return ButtonStyle(
    backgroundColor: baseTheme.backgroundState,
    foregroundColor: baseTheme.foregroundState,
    iconColor: baseTheme.foregroundState,
    side: baseTheme.borderSideState,
    padding: shape == TButtonShape.pill ? size.pillPaddingState : size.paddingState,
    minimumSize: size.minimumSizeState,
    visualDensity: VisualDensity.standard,
    overlayColor: WidgetStateProperty.all(Colors.transparent),
    elevation: WidgetStateProperty.all(0.0),
    textStyle: WidgetStateProperty.all(TextStyle(fontSize: size.font, fontWeight: baseTheme.type.fontWeight, letterSpacing: 0.65)),
    shape: WidgetStateProperty.all(shape.border),
  );
}