share method
Invokes PlatformUtilsImpl.share for the provided item
.
Implementation
Future<void> share(PostItem item) async {
Log.debug('share($item)', '$runtimeType');
try {
try {
await PlatformUtils.share(
item.attachment.original.url,
item.attachment.original.name,
checksum: item.attachment.original.checksum,
);
} catch (_) {
// TODO: Implement.
// if (item.onError != null) {
// await item.onError?.call();
// await PlatformUtils.share(
// item.link,
// item.name,
// checksum: item.checksum,
// );
// } else {
rethrow;
// }
}
} catch (_) {
MessagePopup.error('err_could_not_download'.l10n);
rethrow;
}
}