copyWith method

PickerDecoration copyWith({
  1. bool? showCursor,
  2. Color? cursorColor,
  3. TextAlign? textAlign,
  4. TextStyle? textStyle,
  5. double? cursorWidth,
  6. double? height,
  7. double? width,
  8. Radius? cursorRadius,
  9. double? cursorHeight,
  10. Color? cursorErrorColor,
  11. TextStyle? weekTextStyle,
  12. Decoration? menuDecoration,
  13. bool? enableInteractiveSelection,
  14. HeaderTheme? headerTheme,
  15. PickerTheme? pickerTheme,
})

Creates a copy of this decoration with overridden fields.

Implementation

PickerDecoration copyWith({
  bool? showCursor,
  Color? cursorColor,
  TextAlign? textAlign,
  TextStyle? textStyle,
  double? cursorWidth,
  double? height,
  double? width,
  Radius? cursorRadius,
  double? cursorHeight,
  Color? cursorErrorColor,
  TextStyle? weekTextStyle,
  Decoration? menuDecoration,
  bool? enableInteractiveSelection,
  HeaderTheme? headerTheme,
  PickerTheme? pickerTheme,
}) {
  return PickerDecoration(
    width: width ?? this.width,
    height: height ?? this.height,
    textStyle: textStyle ?? this.textStyle,
    textAlign: textAlign ?? this.textAlign,
    showCursor: showCursor ?? this.showCursor,
    cursorColor: cursorColor ?? this.cursorColor,
    cursorWidth: cursorWidth ?? this.cursorWidth,
    cursorRadius: cursorRadius ?? this.cursorRadius,
    cursorHeight: cursorHeight ?? this.cursorHeight,
    weekTextStyle: weekTextStyle ?? this.weekTextStyle,
    menuDecoration: menuDecoration ?? this.menuDecoration,
    cursorErrorColor: cursorErrorColor ?? this.cursorErrorColor,
    headerTheme: headerTheme ?? this.headerTheme,
    enableInteractiveSelection:
        enableInteractiveSelection ?? this.enableInteractiveSelection,
    pickerTheme: pickerTheme ?? this.pickerTheme,
  );
}