copyWith method

  1. @override
PickerThemeData copyWith({
  1. Color? backgroundColor,
  2. Color? bottomSheetBackgroundColor,
  3. Color? tabBorderColor,
  4. Color? tabEnableColor,
  5. Color? tabDisableColor,
  6. TextStyle? doneTextStyle,
  7. TextStyle? cancelTextStyle,
  8. double? borderRadius,
  9. ButtonStyle? doneButtonStyle,
  10. ButtonStyle? cancelButtonStyle,
})
override

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

Implementation

@override
PickerThemeData copyWith({
  Color? backgroundColor,
  Color? bottomSheetBackgroundColor,
  Color? tabBorderColor,
  Color? tabEnableColor,
  Color? tabDisableColor,
  TextStyle? doneTextStyle,
  TextStyle? cancelTextStyle,
  double? borderRadius,
  ButtonStyle? doneButtonStyle,
  ButtonStyle? cancelButtonStyle,
}) {
  return PickerThemeData(
    bottomSheetBackgroundColor:
        backgroundColor ?? this.bottomSheetBackgroundColor,
    bottomSheetIndicatorColor:
        bottomSheetBackgroundColor ?? bottomSheetIndicatorColor,
    tabEnableColor: tabEnableColor ?? this.tabEnableColor,
    tabDisableColor: tabDisableColor ?? this.tabDisableColor,
    doneTextStyle: doneTextStyle ?? this.doneTextStyle,
    cancelTextStyle: cancelTextStyle ?? this.cancelTextStyle,
    borderRadius: borderRadius ?? this.borderRadius,
    cancelButtonStyle: cancelButtonStyle ?? this.cancelButtonStyle,
    doneButtonStyle: doneButtonStyle ?? this.doneButtonStyle,
    tabBorderColor: tabBorderColor ?? this.tabBorderColor,
  );
}