copyWith method Null safety

TooltipThemeData copyWith(
  1. {double? height,
  2. EdgeInsetsGeometry? padding,
  3. EdgeInsetsGeometry? margin,
  4. double? verticalOffset,
  5. bool? preferBelow,
  6. bool? excludeFromSemantics,
  7. Decoration? decoration,
  8. TextStyle? textStyle,
  9. TextAlign? textAlign,
  10. Duration? waitDuration,
  11. Duration? showDuration,
  12. TooltipTriggerMode? triggerMode,
  13. bool? enableFeedback}
)

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

Implementation

TooltipThemeData copyWith({
  double? height,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? margin,
  double? verticalOffset,
  bool? preferBelow,
  bool? excludeFromSemantics,
  Decoration? decoration,
  TextStyle? textStyle,
  TextAlign? textAlign,
  Duration? waitDuration,
  Duration? showDuration,
  TooltipTriggerMode? triggerMode,
  bool? enableFeedback,
}) {
  return TooltipThemeData(
    height: height ?? this.height,
    padding: padding ?? this.padding,
    margin: margin ?? this.margin,
    verticalOffset: verticalOffset ?? this.verticalOffset,
    preferBelow: preferBelow ?? this.preferBelow,
    excludeFromSemantics: excludeFromSemantics ?? this.excludeFromSemantics,
    decoration: decoration ?? this.decoration,
    textStyle: textStyle ?? this.textStyle,
    textAlign: textAlign ?? this.textAlign,
    waitDuration: waitDuration ?? this.waitDuration,
    showDuration: showDuration ?? this.showDuration,
    triggerMode: triggerMode ?? this.triggerMode,
    enableFeedback: enableFeedback ?? this.enableFeedback,
  );
}