eraseRecords method
Implementation
@override
Future<void> eraseRecords(
DVPrivacySubjectRef subject,
List<DVErasedRecord> records,
) async {
final List<DVCapturedChange> changes = <DVCapturedChange>[
for (final DVErasedRecord record in records)
if (identical(record.table.capture, capture))
await capture.eraseRecord(record.table, record.key),
];
if (changes.isEmpty) return;
final List<String> failures = <String>[];
for (final DVCaptureSink sink in sinks) {
try {
await sink.erase(changes);
} on Object catch (error) {
failures.add('${sink.name}: $error');
}
}
if (failures.isNotEmpty) {
throw StateError(
'destinations not reached: ${failures.join('; ')}');
}
}