copyWith method

SegmentedButtonThemeData copyWith({
  1. ButtonStyle? style,
  2. Widget? selectedIcon,
})

Creates a copy of this object with the given fields replaced with the new values.

Implementation

SegmentedButtonThemeData copyWith({
  ButtonStyle? style,
  Widget? selectedIcon,
}) {
  return SegmentedButtonThemeData(
    style: style ?? this.style,
    selectedIcon: selectedIcon ?? this.selectedIcon,
  );
}