CartButtonStyle.fromColorScheme constructor
CartButtonStyle.fromColorScheme(
- ColorScheme colorScheme, {
- BoxShape shape = BoxShape.rectangle,
- Radius? radius,
- BoxBorder? border,
- TextStyle? textStyle,
- IconThemeData? iconTheme,
- IconData? iconPlus,
- IconData? iconMinus,
- double? buttonAspectRatio,
- double? elevation,
Implementation
factory CartButtonStyle.fromColorScheme(
ColorScheme colorScheme, {
BoxShape shape = BoxShape.rectangle,
Radius? radius,
BoxBorder? border,
TextStyle? textStyle,
IconThemeData? iconTheme,
IconData? iconPlus,
IconData? iconMinus,
double? buttonAspectRatio,
double? elevation,
}) {
return CartButtonStyle(
activeForegroundColor: colorScheme.onPrimary,
activeBackgroundColor: colorScheme.primary,
foregroundColor: colorScheme.onSurface,
backgroundColor: colorScheme.surface,
shadowColor: colorScheme.shadow,
shape: shape,
radius: radius,
border: border,
textStyle: textStyle,
iconTheme: iconTheme ?? const IconThemeData(),
iconPlus: iconPlus,
iconMinus: iconMinus,
elevation: elevation ?? 2,
);
}