groupDeletesByScope method
Group delete ids by scope (from callback or default). Exposed for tests.
Implementation
Map<SyncScope?, List<String>> groupDeletesByScope(List<Id> ids) {
final Map<SyncScope?, List<String>> groups = {};
for (final id in ids) {
final scope = config.scopeForDelete?.call(id) ?? config.defaultScope;
(groups[scope] ??= <String>[]).add(config.idToString(id));
}
return groups;
}