copyWith static method
Makes a copy of the nearest ToggleSwitchTheme overwriting selected fields.
Implementation
static Widget copyWith({
Key? key,
required Widget child,
Color? disabledColor,
Color? activeColor,
Color? activeHoverColor,
Color? inactiveColor,
Color? inactiveHoverColor,
Color? foreground,
}) {
return Builder(
key: key,
builder: (context) => ToggleSwitchTheme(
data: ToggleSwitchTheme.of(context).copyWith(
disabledColor: disabledColor,
activeColor: activeColor,
activeHoverColor: activeHoverColor,
inactiveColor: inactiveColor,
inactiveHoverColor: inactiveHoverColor,
foreground: foreground,
),
child: child,
),
);
}