share static method
Opens the system share sheet and returns whether the user completed a share action. Returns false when the user dismisses it.
Implementation
static Future<bool> share(File file) async {
if (!Platform.isIOS) {
throw UnsupportedError('File sharing through this API requires iOS.');
}
if (!await file.exists() || await file.length() == 0) {
throw FileSystemException('The file to share is missing or empty.', file.path);
}
return await _channel.invokeMethod<bool>('shareFile', {'path': file.path}) ??
false;
}