copyWith method

  1. @override
TxBorderSide copyWith({
  1. Color? color,
  2. double? width,
  3. BorderStyle? style,
  4. LinearGradient? gradient,
  5. double? strokeAlign,
  6. List<double>? dashPattern,
})
override

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

Implementation

@override
TxBorderSide copyWith({
  Color? color,
  double? width,
  BorderStyle? style,
  LinearGradient? gradient,
  double? strokeAlign,
  List<double>? dashPattern,
}) {
  assert(width == null || width >= 0.0);
  return TxBorderSide(
    color: color ?? this.color,
    width: width ?? this.width,
    style: style ?? this.style,
    gradient: gradient ?? this.gradient,
    dashPattern: dashPattern ?? this.dashPattern,
    strokeAlign: strokeAlign ?? this.strokeAlign,
  );
}