exportStateHistory method

Future<ExportStateHistory> exportStateHistory({
  1. ExportEditorConfigs configs = const ExportEditorConfigs(),
})

Exports the current state history.

configs specifies the export configurations, such as whether to include filters or layers.

Returns an ExportStateHistory object containing the exported state history, image state history, image size, edit position, and export configurations.

Implementation

Future<ExportStateHistory> exportStateHistory(
    {ExportEditorConfigs configs = const ExportEditorConfigs()}) async {
  if (_imageInfos == null) await _decodeImage();

  return ExportStateHistory(
    this.configs,
    _stateManager.stateHistory,
    _imageInfos!,
    _sizesManager.decodedImageSize,
    _stateManager.position,
    configs: configs,
    // ignore: use_build_context_synchronously
    context: context,
  );
}