copyWith method

ImagePreviewConfig copyWith({
  1. bool? enable,
  2. List? images,
  3. int? initialIndex,
  4. bool? loop,
  5. double? minScale,
  6. double? maxScale,
  7. Color? backgroundColor,
  8. Color? closeBtnColor,
  9. double? slideThreshold,
  10. Duration? doubleTapDuration,
  11. List<Widget?>? customBottomWidgets,
  12. EdgeInsetsGeometry? customBottomPadding,
  13. double? bottomMargin,
  14. double? bottomToImageSpacing,
})

Implementation

ImagePreviewConfig copyWith({
  bool? enable,
  List<dynamic>? images,
  int? initialIndex,
  bool? loop,
  double? minScale,
  double? maxScale,
  Color? backgroundColor,
  Color? closeBtnColor,
  double? slideThreshold,
  Duration? doubleTapDuration,
  List<Widget?>? customBottomWidgets,
  EdgeInsetsGeometry? customBottomPadding,
  double? bottomMargin,
  double? bottomToImageSpacing,
}) {
  return ImagePreviewConfig(
    enable: enable ?? this.enable,
    images: images ?? this.images,
    initialIndex: initialIndex ?? this.initialIndex,
    loop: loop ?? this.loop,
    minScale: minScale ?? this.minScale,
    maxScale: maxScale ?? this.maxScale,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    closeBtnColor: closeBtnColor ?? this.closeBtnColor,
    slideThreshold: slideThreshold ?? this.slideThreshold,
    doubleTapDuration: doubleTapDuration ?? this.doubleTapDuration,
    customBottomWidgets: customBottomWidgets ?? this.customBottomWidgets,
    customBottomPadding: customBottomPadding ?? this.customBottomPadding,
    bottomMargin: bottomMargin ?? this.bottomMargin,
    bottomToImageSpacing: bottomToImageSpacing ?? this.bottomToImageSpacing,
  );
}