getCloudIdentifiers method
Resolve the stable cloud identifiers for the given ids (localIdentifiers).
Returns a map keyed by the input localIdentifier. A value is null when
the asset has no cloud identifier. Returns an empty map on unsupported
platforms (non-Darwin, iOS < 15, macOS < 12).
Backed by PHPhotoLibrary.cloudIdentifierMappingsForLocalIdentifiers.
Implementation
Future<Map<String, String?>> getCloudIdentifiers(List<String> ids) async {
if (!(Platform.isIOS || Platform.isMacOS)) {
return <String, String?>{};
}
final Map result = await _channel.invokeMethod(
PMConstants.mGetCloudIdentifiers,
<String, dynamic>{'ids': ids},
);
return result.map(
(key, value) => MapEntry(key as String, value as String?),
);
}