copyWith method

PipSettings copyWith({
  1. double? collapsedWidth,
  2. double? collapsedHeight,
  3. double? expandedWidth,
  4. double? expandedHeight,
  5. BorderRadius? borderRadius,
  6. EdgeInsets? screenPadding,
  7. Duration? animationDuration,
  8. Curve? animationCurve,
  9. Color? backgroundColor,
  10. Color? shadowColor,
  11. double? elevation,
  12. bool? showDragHandle,
  13. Color? dragHandleColor,
  14. bool? showCloseButton,
  15. Color? closeButtonColor,
  16. bool? showExpandButton,
  17. Color? expandButtonColor,
  18. bool? showProgressBar,
  19. Color? progressBarColor,
  20. Color? progressBarBackgroundColor,
  21. double? progressBarHeight,
  22. bool? snapToEdges,
  23. double? snapThreshold,
  24. bool? allowDrag,
  25. bool? allowExpand,
  26. bool? showBackdropWhenExpanded,
  27. Color? backdropColor,
  28. bool? showTitle,
  29. TextStyle? titleStyle,
  30. bool? showControls,
  31. double? controlsHeight,
  32. Color? controlsBackgroundColor,
  33. Offset? offset,
})

Creates a copy of this settings with the given fields replaced

Implementation

PipSettings copyWith({
  double? collapsedWidth,
  double? collapsedHeight,
  double? expandedWidth,
  double? expandedHeight,
  BorderRadius? borderRadius,
  EdgeInsets? screenPadding,
  Duration? animationDuration,
  Curve? animationCurve,
  Color? backgroundColor,
  Color? shadowColor,
  double? elevation,
  bool? showDragHandle,
  Color? dragHandleColor,
  bool? showCloseButton,
  Color? closeButtonColor,
  bool? showExpandButton,
  Color? expandButtonColor,
  bool? showProgressBar,
  Color? progressBarColor,
  Color? progressBarBackgroundColor,
  double? progressBarHeight,
  bool? snapToEdges,
  double? snapThreshold,
  bool? allowDrag,
  bool? allowExpand,
  bool? showBackdropWhenExpanded,
  Color? backdropColor,
  bool? showTitle,
  TextStyle? titleStyle,
  bool? showControls,
  double? controlsHeight,
  Color? controlsBackgroundColor,
  Offset? offset,
}) {
  return PipSettings(
    collapsedWidth: collapsedWidth ?? this.collapsedWidth,
    collapsedHeight: collapsedHeight ?? this.collapsedHeight,
    expandedWidth: expandedWidth ?? this.expandedWidth,
    expandedHeight: expandedHeight ?? this.expandedHeight,
    borderRadius: borderRadius ?? this.borderRadius,
    screenPadding: screenPadding ?? this.screenPadding,
    animationDuration: animationDuration ?? this.animationDuration,
    animationCurve: animationCurve ?? this.animationCurve,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    shadowColor: shadowColor ?? this.shadowColor,
    elevation: elevation ?? this.elevation,
    showDragHandle: showDragHandle ?? this.showDragHandle,
    dragHandleColor: dragHandleColor ?? this.dragHandleColor,
    showCloseButton: showCloseButton ?? this.showCloseButton,
    closeButtonColor: closeButtonColor ?? this.closeButtonColor,
    showExpandButton: showExpandButton ?? this.showExpandButton,
    expandButtonColor: expandButtonColor ?? this.expandButtonColor,
    snapToEdges: snapToEdges ?? this.snapToEdges,
    snapThreshold: snapThreshold ?? this.snapThreshold,
    allowDrag: allowDrag ?? this.allowDrag,
    allowExpand: allowExpand ?? this.allowExpand,
    showBackdropWhenExpanded:
        showBackdropWhenExpanded ?? this.showBackdropWhenExpanded,
    backdropColor: backdropColor ?? this.backdropColor,
    controlsBackgroundColor:
        controlsBackgroundColor ?? this.controlsBackgroundColor,
    offset: offset ?? this.offset,
  );
}