copyWith method
UISegmentedButtonThemeData
copyWith({
- double? height,
- double? spacing,
- EdgeInsets? padding,
- EdgeInsets? itemPadding,
- BorderRadius? borderRadius,
- Color? backgroundColor,
- Color? segmentBackgroundColor,
- Color? selectedColor,
- Color? unselectedForegroundColor,
- Color? disabledColor,
- 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,
);
}