copyWith method

LabelTheme copyWith({
  1. TextStyle? textStyle,
  2. Color? backgroundColor,
  3. BoxBorder? border,
  4. BorderRadius? borderRadius,
  5. EdgeInsets? padding,
  6. double? maxWidth,
  7. int? maxLines,
  8. double? offset,
  9. double? labelGap,
})

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

Implementation

LabelTheme copyWith({
  TextStyle? textStyle,
  Color? backgroundColor,
  BoxBorder? border,
  BorderRadius? borderRadius,
  EdgeInsets? padding,
  double? maxWidth,
  int? maxLines,
  double? offset,
  double? labelGap,
}) {
  return LabelTheme(
    textStyle: textStyle ?? this.textStyle,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    border: border ?? this.border,
    borderRadius: borderRadius ?? this.borderRadius,
    padding: padding ?? this.padding,
    maxWidth: maxWidth ?? this.maxWidth,
    maxLines: maxLines ?? this.maxLines,
    offset: offset ?? this.offset,
    labelGap: labelGap ?? this.labelGap,
  );
}