shareContent method
Share content with the given parameters
Implementation
@override
Future<bool> shareContent({
required String content,
String? subject,
String? title,
}) async {
if (!isSupported) {
throw UnsupportedError(
'Sharing not supported on this platform',
);
}
try {
if (PlatformDetector.isWasm) {
// Use web-based sharing for WASM
return await _shareViaWeb(content, subject, title);
} else {
// Use native sharing for other platforms
return await _shareViaNative(content, subject, title);
}
} catch (e) {
debugPrint('Sharing failed: $e');
return false;
}
}