copyWith method

ImageEditorCustomWidgets copyWith({
  1. CustomWidgetsMainEditor? mainEditor,
  2. CustomWidgetsPaintEditor? paintEditor,
  3. CustomWidgetsTextEditor? textEditor,
  4. CustomWidgetsCropRotateEditor? cropRotateEditor,
  5. CustomWidgetsFilterEditor? filterEditor,
  6. CustomWidgetsTuneEditor? tuneEditor,
  7. CustomWidgetsBlurEditor? blurEditor,
  8. Widget loadingDialog(
    1. String message,
    2. ProImageEditorConfigs configs
    )?,
  9. Widget? circularProgressIndicator,
  10. CustomWidgetsLayerInteraction? layerInteraction,
})

Creates a copy of this ImageEditorCustomWidgets object with the given fields replaced with new values.

The copyWith method allows you to create a new instance of ImageEditorCustomWidgets with some properties updated while keeping the others unchanged.

Implementation

ImageEditorCustomWidgets copyWith({
  CustomWidgetsMainEditor? mainEditor,
  CustomWidgetsPaintEditor? paintEditor,
  CustomWidgetsTextEditor? textEditor,
  CustomWidgetsCropRotateEditor? cropRotateEditor,
  CustomWidgetsFilterEditor? filterEditor,
  CustomWidgetsTuneEditor? tuneEditor,
  CustomWidgetsBlurEditor? blurEditor,
  Widget Function(String message, ProImageEditorConfigs configs)?
      loadingDialog,
  Widget? circularProgressIndicator,
  CustomWidgetsLayerInteraction? layerInteraction,
}) {
  return ImageEditorCustomWidgets(
    mainEditor: mainEditor ?? this.mainEditor,
    paintEditor: paintEditor ?? this.paintEditor,
    textEditor: textEditor ?? this.textEditor,
    cropRotateEditor: cropRotateEditor ?? this.cropRotateEditor,
    filterEditor: filterEditor ?? this.filterEditor,
    tuneEditor: tuneEditor ?? this.tuneEditor,
    blurEditor: blurEditor ?? this.blurEditor,
    loadingDialog: loadingDialog ?? this.loadingDialog,
    circularProgressIndicator:
        circularProgressIndicator ?? this.circularProgressIndicator,
    layerInteraction: layerInteraction ?? this.layerInteraction,
  );
}