copyWith method
ImagePreviewConfig
copyWith({
- bool? enable,
- List? 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,
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,
);
}