---
title: "Conflict resolution when saving PDFs | Nutrient Flutter SDK"
canonical_url: "https://www.nutrient.io/guides/flutter/save-a-document/conflict-resolution/"
md_url: "https://www.nutrient.io/guides/flutter/save-a-document/conflict-resolution.md"
last_updated: "2026-05-26T01:23:09.645Z"
description: "Handle external file changes and conflicts when saving PDF documents using Nutrient Flutter SDK on iOS."
---

# Conflict resolution

Nutrient Flutter SDK offers a built-in mechanism for detecting external file changes on iOS. When outside modifications conflict with unsaved local changes, the SDK can automatically resolve conflicts or present options to the user.

## Conflict resolution options

Configure conflict resolution behavior using `IOSFileConflictResolution` in `PdfConfiguration`:

```dart

NutrientView(
  documentPath: documentPath,
  configuration: PdfConfiguration(
    iOSFileConflictResolution: IOSFileConflictResolution.defaultBehavior,
  ),
);

```

## Available options

The following conflict resolution options are available:

| Option            | Description                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------- |
| `defaultBehavior` | Shows an alert for the user to choose how to resolve the conflict.                        |
| `close`           | Automatically closes the document when a conflict is detected.                            |
| `save`            | Saves in-memory changes, overriding external modifications. Restores the file if deleted. |
| `reload`          | Discards local changes and reloads the document from disk.                                |

## Example

```dart

import 'package:nutrient_flutter/nutrient_flutter.dart';

class DocumentViewer extends StatelessWidget {
  final String documentPath;

  const DocumentViewer({super.key, required this.documentPath});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: NutrientView(
        documentPath: documentPath,
        configuration: PdfConfiguration(
          // Automatically save local changes when conflicts occur.
          iOSFileConflictResolution: IOSFileConflictResolution.save,
        ),
      ),
    );
  }
}

```

## Platform support

Conflict resolution is supported on the following platforms:

| Platform | Support |
| -------- | ------- |
| iOS      | Yes     |
| Android  | No      |
| Web      | No      |

Conflict resolution relies on iOS file coordination APIs and APFS copy-on-write functionality. On Android and web, external file changes are not automatically detected.

---

## Related pages

- [Auto save PDF files in Flutter](/guides/flutter/save-a-document.md)
- [Detecting unsaved changes in PDFs](/guides/flutter/save-a-document/detect-unsaved-changes.md)
- [How to use Save As for PDFs in Flutter](/guides/flutter/save-a-document/save-as.md)
- [Save a document to a remote server in Flutter](/guides/flutter/save-a-document/save-to-remote.md)
- [Supported document save options in Flutter](/guides/flutter/save-a-document/save-options.md)

