copyWith method

NativeContainerStyle copyWith({
  1. Color? backgroundColor,
  2. OverlayShape? shape,
  3. double? borderRadius,
  4. OverlayPosition? position,
  5. int? xOffset,
  6. int? yOffset,
  7. double? width,
  8. double? height,
  9. NativeEdgeInsets? padding,
})

Creates a copy of this container style with the given fields replaced.

Implementation

NativeContainerStyle copyWith({
  Color? backgroundColor,
  OverlayShape? shape,
  double? borderRadius,
  OverlayPosition? position,
  int? xOffset,
  int? yOffset,
  double? width,
  double? height,
  NativeEdgeInsets? padding,
}) {
  return NativeContainerStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    shape: shape ?? this.shape,
    borderRadius: borderRadius ?? this.borderRadius,
    position: position ?? this.position,
    xOffset: xOffset ?? this.xOffset,
    yOffset: yOffset ?? this.yOffset,
    width: width ?? this.width,
    height: height ?? this.height,
    padding: padding ?? this.padding,
  );
}