copyWith static method

Widget copyWith({
  1. Key? key,
  2. required Widget child,
  3. Color? disabledColor,
  4. Color? activeColor,
  5. Color? activeHoverColor,
  6. Color? trackColor,
  7. Color? hightlightColor,
})

Makes a copy of the nearest SliderTheme overwriting selected fields.

Implementation

static Widget copyWith({
  Key? key,
  required Widget child,
  Color? disabledColor,
  Color? activeColor,
  Color? activeHoverColor,
  Color? trackColor,
  Color? hightlightColor,
}) {
  return Builder(
    key: key,
    builder: (context) => SliderTheme(
      data: SliderTheme.of(context).copyWith(
        disabledColor: disabledColor,
        activeColor: activeColor,
        activeHoverColor: activeHoverColor,
        trackColor: trackColor,
        hightlightColor: hightlightColor,
      ),
      child: child,
    ),
  );
}