copyWith method

  1. @override
UISegmentedButtonThemeData copyWith({
  1. double? height,
  2. double? spacing,
  3. EdgeInsets? padding,
  4. EdgeInsets? itemPadding,
  5. BorderRadius? borderRadius,
  6. Color? backgroundColor,
  7. Color? segmentBackgroundColor,
  8. Color? selectedColor,
  9. Color? unselectedForegroundColor,
  10. Color? disabledColor,
  11. TextStyle? textStyle,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
UISegmentedButtonThemeData copyWith({
  double? height,
  double? spacing,
  EdgeInsets? padding,
  EdgeInsets? itemPadding,
  BorderRadius? borderRadius,
  Color? backgroundColor,
  Color? segmentBackgroundColor,
  Color? selectedColor,
  Color? unselectedForegroundColor,
  Color? disabledColor,
  TextStyle? textStyle,
}) {
  return UISegmentedButtonThemeData(
    height: height ?? this.height,
    spacing: spacing ?? this.spacing,
    padding: padding ?? this.padding,
    borderRadius: borderRadius ?? this.borderRadius,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    segmentBackgroundColor: segmentBackgroundColor ?? this.segmentBackgroundColor,
    selectedForegroundColor: selectedColor ?? this.selectedForegroundColor,
    unselectedForegroundColor: unselectedForegroundColor ?? this.unselectedForegroundColor,
    textStyle: textStyle ?? this.textStyle,
  );
}