copyWith method

TreeViewTheme copyWith({
  1. ColorScheme? colorScheme,
  2. IconThemeData? iconTheme,
  3. ExpanderThemeData? expanderTheme,
  4. TextStyle? labelStyle,
  5. TextStyle? parentLabelStyle,
  6. TextOverflow? labelOverflow,
  7. TextOverflow? parentLabelOverflow,
  8. bool? dense,
  9. double? verticalSpacing,
  10. double? horizontalSpacing,
  11. double? iconPadding,
  12. double? levelPadding,
})

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

Implementation

TreeViewTheme copyWith({
  ColorScheme? colorScheme,
  IconThemeData? iconTheme,
  ExpanderThemeData? expanderTheme,
  TextStyle? labelStyle,
  TextStyle? parentLabelStyle,
  TextOverflow? labelOverflow,
  TextOverflow? parentLabelOverflow,
  bool? dense,
  double? verticalSpacing,
  double? horizontalSpacing,
  double? iconPadding,
  double? levelPadding,
}) {
  return TreeViewTheme(
      colorScheme: colorScheme ?? this.colorScheme,
      levelPadding: levelPadding ?? this.levelPadding,
      iconPadding: iconPadding ?? this.iconPadding,
      iconTheme: iconTheme ?? this.iconTheme,
      expanderTheme: expanderTheme ?? this.expanderTheme,
      labelStyle: labelStyle ?? this.labelStyle,
      dense: dense ?? this.dense,
      verticalSpacing: verticalSpacing ?? this.verticalSpacing,
      horizontalSpacing: horizontalSpacing ?? this.horizontalSpacing,
      parentLabelStyle: parentLabelStyle ?? this.parentLabelStyle,
      labelOverflow: labelOverflow ?? this.labelOverflow,
      parentLabelOverflow: parentLabelOverflow ?? this.parentLabelOverflow);
}