copyWith method

BetterSwitchTheme copyWith({
  1. double? width,
  2. double? height,
  3. Color? ballBackgroundColor,
  4. double? ballWidth,
  5. double? ballHeight,
  6. Color? inactiveBackgroundColor,
  7. Color? activeBackgroundColor,
  8. EdgeInsetsGeometry? padding,
  9. double? loadingSize,
  10. double? loadingStrokeWidth,
  11. Color? loadingColor,
})

Implementation

BetterSwitchTheme copyWith({
  double? width,
  double? height,
  Color? ballBackgroundColor,
  double? ballWidth,
  double? ballHeight,
  Color? inactiveBackgroundColor,
  Color? activeBackgroundColor,
  EdgeInsetsGeometry? padding,
  double? loadingSize,
  double? loadingStrokeWidth,
  Color? loadingColor,
}) {
  return BetterSwitchTheme(
    width: width ?? this.width,
    height: height ?? this.height,
    ballBackgroundColor: ballBackgroundColor ?? this.ballBackgroundColor,
    inactiveBackgroundColor:
        inactiveBackgroundColor ?? this.inactiveBackgroundColor,
    activeBackgroundColor:
        activeBackgroundColor ?? this.activeBackgroundColor,
    padding: padding ?? this.padding,
    loadingSize: loadingSize ?? this.loadingSize,
    loadingStrokeWidth: loadingStrokeWidth ?? this.loadingStrokeWidth,
    loadingColor: loadingColor ?? this.loadingColor,
  );
}