donate static method
Replaces the donated set with targets, ranked in list order. The OS
caps how many it keeps; extras past the cap are dropped.
category is Android-only: it must be the category the app's
<share-target> declares — the share sheet matches the two, and a
mismatch simply shows nothing. iOS ignores it.
Implementation
static Future<void> donate({
required List<XShortcutTarget> targets,
required String category,
}) async {
if (!supported) return;
await _channel.invokeMethod<void>('donate', {
'targets': [for (final t in targets) t.toMap()],
'category': category,
});
}