copyWith method

ChildNodeTheme<T> copyWith({
  1. Widget? widget,
  2. Widget? widgetResolver(
    1. Node<T> node
    )?,
  3. double? width,
  4. double? height,
  5. EdgeInsets? padding,
  6. EdgeInsets? margin,
  7. TextStyle? textStyle,
  8. TextStyle? textStyleResolver(
    1. Node<T> node
    )?,
  9. String? labelResolver(
    1. Node<T> node
    )?,
  10. TextStyle? selectedTextStyle,
  11. TextStyle? selectedTextStyleResolver(
    1. Node<T> node
    )?,
  12. Color? selectedBackgroundColor,
  13. Color? hoverColor,
  14. Color? splashColor,
  15. Color? highlightColor,
  16. int? clickInterval,
  17. NodeTooltipTheme<T>? tooltipTheme,
})

Creates a copy of this theme with the given fields replaced with new values

Implementation

ChildNodeTheme<T> copyWith({
  Widget? widget,
  Widget? Function(Node<T> node)? widgetResolver,
  double? width,
  double? height,
  EdgeInsets? padding,
  EdgeInsets? margin,
  TextStyle? textStyle,
  TextStyle? Function(Node<T> node)? textStyleResolver,
  String? Function(Node<T> node)? labelResolver,
  TextStyle? selectedTextStyle,
  TextStyle? Function(Node<T> node)? selectedTextStyleResolver,
  Color? selectedBackgroundColor,
  Color? hoverColor,
  Color? splashColor,
  Color? highlightColor,
  int? clickInterval,
  NodeTooltipTheme<T>? tooltipTheme,
}) {
  return ChildNodeTheme<T>(
    widget: widget ?? this.widget,
    widgetResolver: widgetResolver ?? this.widgetResolver,
    width: width ?? this.width,
    height: height ?? this.height,
    padding: padding ?? this.padding,
    margin: margin ?? this.margin,
    textStyle: textStyle ?? this.textStyle,
    textStyleResolver: textStyleResolver ?? this.textStyleResolver,
    labelResolver: labelResolver ?? this.labelResolver,
    selectedTextStyle: selectedTextStyle ?? this.selectedTextStyle,
    selectedTextStyleResolver:
        selectedTextStyleResolver ?? this.selectedTextStyleResolver,
    selectedBackgroundColor:
        selectedBackgroundColor ?? this.selectedBackgroundColor,
    hoverColor: hoverColor ?? this.hoverColor,
    splashColor: splashColor ?? this.splashColor,
    highlightColor: highlightColor ?? this.highlightColor,
    clickInterval: clickInterval ?? this.clickInterval,
    tooltipTheme: tooltipTheme ?? this.tooltipTheme,
  );
}