discontinuedPackage fluttersdk_artisan has been discontinued and replaced by dowel.

ConflictDetector class

Pre-flight conflict detector for InstallTransaction.

Before committing a set of InstallOperations, detect inspects each operation that would write or overwrite a file and determines whether the current on-disk state is safe to overwrite automatically.

Detection reads from two JSON sources:

  1. <projectRoot>/.artisan/installed/<pluginName>.json -- per-plugin record that stores stubHashes (absolute path to md5 hex string).
  2. <projectRoot>/.artisan/installed/INDEX.json -- global shared-file index (V1: existence check only; absence of this file causes any unrecorded file to be treated as an 'unmanaged-file' conflict).

Usage

final detector = ConflictDetector(ctx);
final conflicts = detector.detect(ops, pluginName: 'firebase_messaging');
if (conflicts.isNotEmpty) {
  // Surface to user or pass --force to bypass.
}

Constructors

ConflictDetector(InstallContext ctx)
Creates a ConflictDetector bound to ctx for filesystem and path resolution.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

detect(List<InstallOperation> ops, {required String pluginName}) → List<FileConflict>
Inspects ops and returns any file conflicts that would need user confirmation (or a --force flag) before committing.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited