DataPatch class

A patch that can transform one data state into another.

Constructors

DataPatch(List<PatchOperation> operations)
Creates a DataPatch.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the patch has no operations.
no setter
length int
The number of operations.
no setter
operations List<PatchOperation>
The list of operations in this patch.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(Map<String, dynamic> data) Map<String, dynamic>
Applies this patch to data and returns the result.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reverse() DataPatch
Creates a reverse patch that undoes this patch.
toJson() List<Map<String, dynamic>>
Converts the patch to RFC 6902 JSON format.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(List<Map<String, dynamic>> json) DataPatch
Creates a DataPatch from RFC 6902 JSON format.