changeset method
Serialize captured changes to a portable byte blob suitable for passing to Database.applyChangeset.
Implementation
Uint8List changeset() {
final doc = {
'__ddbs_changeset__': 1,
'changes': [for (final c in _changes) c.toJson()],
};
return Uint8List.fromList(utf8.encode(jsonEncode(doc)));
}