This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/flutter/save-a-document/conflict-resolution.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Conflict resolution when saving PDFs | Nutrient Flutter SDK

Nutrient Flutter SDK can detect external file changes on iOS. When external changes conflict with unsaved local changes, the SDK can resolve the conflict or ask the user to choose a resolution.

Configure conflict resolution

Set the fileConflictResolution option in IOSViewConfiguration to choose how the SDK handles file conflicts. Refer to the file conflict resolution(opens in a new tab) and iOS view configuration(opens in a new tab) API references for details.

NutrientDocumentView(
documentPath: documentPath,
configuration: const NutrientViewConfiguration(
iosConfig: IOSViewConfiguration(
fileConflictResolution: IOSFileConflictResolution.defaultBehavior,
),
),
)

Choose a conflict resolution option

Use one of the following conflict resolution options:

OptionDescription
defaultBehaviorShows an alert so the user can choose how to resolve the conflict.
closeCloses the document when the SDK detects a conflict.
saveSaves in-memory changes and overwrites external changes. Restores the file if deleted.
reloadDiscards local changes and reloads the document from disk.

Save local changes when conflicts occur

The following example saves local changes when the SDK detects a conflict:

import 'package:flutter/material.dart';
import 'package:nutrient_flutter/bindings.dart';
class DocumentViewer extends StatelessWidget {
final String documentPath;
const DocumentViewer({super.key, required this.documentPath});
@override
Widget build(BuildContext context) {
return Scaffold(
body: NutrientDocumentView(
documentPath: documentPath,
configuration: const NutrientViewConfiguration(
iosConfig: IOSViewConfiguration(
// Automatically save local changes when conflicts occur.
fileConflictResolution: IOSFileConflictResolution.save,
),
),
),
);
}
}

Check platform support

Nutrient Flutter SDK supports conflict resolution on iOS only:

PlatformSupport
iOSYes
AndroidNo
WebNo

Conflict resolution relies on iOS file coordination APIs and Apple File System (APFS) copy-on-write functionality. On Android and web, the SDK doesn’t detect external file changes.