KoolbaseConflict class
A queued offline write the server would not apply, because the record changed between the change being made and the queue reaching it.
Not an error to dismiss and not a write to retry: retrying cannot help, and discarding it would lose a change the user believes is saved. It waits, and keeps waiting across restarts, until the application decides.
Only the application can decide. Whether a later edit should win depends on what the data means, and a platform that chooses for everyone is wrong for someone.
Constructors
-
KoolbaseConflict({required String id, required String collection, required String recordId, required ConflictOperation operation, required Map<
String, dynamic> ? baseline, required Map<String, dynamic> ? local, required Map<String, dynamic> ? server, required ConflictReason reason, required String? message, required int? baseRevision, required int? serverRevision, required DateTime createdAt, required ConflictResolver resolver})
Properties
- age → Duration
-
How long this has been waiting.
no setter
-
baseline
→ Map<
String, dynamic> ? -
The record as it was when the change was composed.
final
- baseRevision → int?
-
final
- collection → String
-
final
- createdAt → DateTime
-
final
-
divergentFields
→ List<
String> -
Fields where the user's change and the server's version disagree.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
final
-
local
→ Map<
String, dynamic> ? -
The change the user made, still unapplied.
final
- message → String?
-
What the server said, when it refused for a terminal reason.
final
- operation → ConflictOperation
-
final
- reason → ConflictReason
-
Why this is waiting.
final
- recordId → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
server
→ Map<
String, dynamic> ? -
The record as the server held it when the write was refused. Captured with
the refusal, so showing both versions costs no fetch and cannot race one.
final
- serverRevision → int?
-
final
Methods
-
abandon(
) → Future< void> - Drops the change without claiming either version won.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveWithLocal(
) → Future< void> - Reapplies the user's change to the record as it stands now.
-
resolveWithMerge(
Map< String, dynamic> data) → Future<void> - Applies a merged result the application composed from both versions.
-
resolveWithServer(
) → Future< void> - Keeps the server's version and discards the user's change.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited