SyncFilter class abstract interface

A filter that decides which SyncChanges are pushed and which remote changes are applied during a sync round-trip.

Implementations:

  • AllowAllSyncFilter — no filter, the default. Every change is included.
  • TableNameSyncFilter — include only changes for the given table(s).
  • ExpressionSyncFilter<T> — include only changes whose rows match a predicate (record-level filter).
  • ScopedSyncFilter — compose multiple filters (AND / OR).

Design

A SyncFilter is a value object that the sync layer reads during a round-trip. It does NOT hold state. To make a filter dynamic (e.g. "the current user's id"), wrap it in a closure or use a function-based filter (FilterBuilder).

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
The human-readable name of this filter. Used in error messages and logs.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

matches(SyncChange change) bool
true if change should be included in the round-trip. The sync layer calls this once per SyncChange during the pushing phase (for local changes) and once during the applying phase (for remote changes).
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