copyWith method

BorderSide copyWith({
  1. Color? color,
  2. double? width,
  3. BorderStyle? style,
  4. double? strokeAlign,
})

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

Implementation

BorderSide copyWith({
  Color? color,
  double? width,
  BorderStyle? style,
  double? strokeAlign,
}) {
  return BorderSide(
    color: color ?? this.color,
    width: width ?? this.width,
    style: style ?? this.style,
    strokeAlign: strokeAlign ?? this.strokeAlign,
  );
}