fromThemeGeneratorParameters static method

ButtonTheme fromThemeGeneratorParameters(
  1. ThemeGeneratorParameters parameters
)

Implementation

static ButtonTheme fromThemeGeneratorParameters(
  ThemeGeneratorParameters parameters,
) {
  return ButtonTheme(
    color: parameters.filteredBackgroundColor.lighter(16),
    shadow: _getShadowFromDesignLanguage(parameters.designLanguage),
    disabledButtonIconTheme: IconThemeData(
      color: _getColorFromBrightness(parameters.brightness).withOpacity(0.25),
      size: _getIconSizeFromLayout(parameters.layout),
    ),
    pressedButtonIconTheme: IconThemeData(
      color: _getColorFromBrightness(parameters.brightness).withOpacity(0.5),
      size: _getIconSizeFromLayout(parameters.layout),
    ),
    iconTheme: IconThemeData(
      color: _getColorFromBrightness(parameters.brightness).withOpacity(0.9),
      size: _getIconSizeFromLayout(parameters.layout),
    ),
    disabledButtonTextStyle: TextStyle(
      color: _getColorFromBrightness(parameters.brightness).withOpacity(0.25),
    ),
    pressedButtonTextStyle: TextStyle(
      color: _getColorFromBrightness(parameters.brightness).withOpacity(0.5),
    ),
    textStyle: TextStyle(
      color: _getColorFromBrightness(parameters.brightness).withOpacity(0.9),
    ),
    boxBorder: _getBoxBorderFromDesignLanguage(parameters.designLanguage),
  );
}