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