copyWith method

ToggleSwitchThemeData copyWith({
  1. Color? disabledColor,
  2. Color? activeColor,
  3. Color? activeHoverColor,
  4. Color? inactiveColor,
  5. Color? inactiveHoverColor,
  6. Color? foreground,
})

Makes a copy of ToggleSwitchThemeData overwriting selected fields.

Implementation

ToggleSwitchThemeData copyWith({
  Color? disabledColor,
  Color? activeColor,
  Color? activeHoverColor,
  Color? inactiveColor,
  Color? inactiveHoverColor,
  Color? foreground,
}) {
  return ToggleSwitchThemeData(
    disabledColor: disabledColor ?? this.disabledColor,
    activeColor: activeColor ?? this.activeColor,
    activeHoverColor: activeHoverColor ?? this.activeHoverColor,
    inactiveColor: inactiveColor ?? this.inactiveColor,
    inactiveHoverColor: inactiveHoverColor ?? this.inactiveHoverColor,
    foreground: foreground ?? this.foreground,
  );
}