copyWith method

GradientBorder copyWith({
  1. double? width,
  2. List<Color>? colors,
  3. Duration? animationDuration,
  4. double? cornerRadius,
})

Creates a copy with the specified fields replaced.

Implementation

GradientBorder copyWith({
  double? width,
  List<Color>? colors,
  Duration? animationDuration,
  double? cornerRadius,
}) {
  return GradientBorder(
    width: width ?? this.width,
    colors: colors ?? this.colors,
    animationDuration: animationDuration ?? this.animationDuration,
    cornerRadius: cornerRadius ?? this.cornerRadius,
  );
}