CartStepperStyle.fromColorScheme constructor

CartStepperStyle.fromColorScheme(
  1. ColorScheme colorScheme, {
  2. BoxShape shape = BoxShape.rectangle,
  3. Radius? radius,
  4. BoxBorder? border,
  5. TextStyle? textStyle,
  6. IconThemeData? iconTheme,
  7. IconData? iconPlus,
  8. IconData? iconMinus,
  9. double? buttonAspectRatio,
  10. double? elevation,
})

Create style from colorScheme

Implementation

factory CartStepperStyle.fromColorScheme(
  ColorScheme colorScheme, {
  BoxShape shape = BoxShape.rectangle,
  Radius? radius,
  BoxBorder? border,
  TextStyle? textStyle,
  IconThemeData? iconTheme,
  IconData? iconPlus,
  IconData? iconMinus,
  double? buttonAspectRatio,
  double? elevation,
}) {
  return CartStepperStyle(
    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,
  );
}