copyWith method

  1. @override
BoxTestSpec copyWith({
  1. AlignmentGeometry? alignment,
  2. AnimatedData? animated,
  3. Clip? clipBehavior,
  4. BoxConstraints? constraints,
  5. Decoration? decoration,
  6. Decoration? foregroundDecoration,
  7. double? height,
  8. EdgeInsetsGeometry? margin,
  9. EdgeInsetsGeometry? padding,
  10. Matrix4? transform,
  11. AlignmentGeometry? transformAlignment,
  12. double? width,
})
override

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

Implementation

@override
BoxTestSpec copyWith({
  AlignmentGeometry? alignment,
  AnimatedData? animated,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Decoration? decoration,
  Decoration? foregroundDecoration,
  double? height,
  EdgeInsetsGeometry? margin,
  EdgeInsetsGeometry? padding,
  Matrix4? transform,
  AlignmentGeometry? transformAlignment,
  double? width,
}) {
  return BoxTestSpec(
    alignment: alignment ?? this.alignment,
    animated: animated ?? this.animated,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    constraints: constraints ?? this.constraints,
    decoration: decoration ?? this.decoration,
    foregroundDecoration: foregroundDecoration ?? this.foregroundDecoration,
    height: height ?? this.height,
    margin: margin ?? this.margin,
    padding: padding ?? this.padding,
    transform: transform ?? this.transform,
    transformAlignment: transformAlignment ?? this.transformAlignment,
    width: width ?? this.width,
  );
}