shareUri static method

Future<ShareResult> shareUri(
  1. Uri uri, {
  2. Rect? sharePositionOrigin,
})

Summons the platform's share sheet to share uri.

Wraps the platform's native share dialog. Can share a URL. It uses the ACTION_SEND Intent on Android and UIActivityViewController on iOS. shareUri will trigger the iOS system to fetch the html page (if available), and the website icon will be extracted and displayed on the iOS share sheet.

The optional sharePositionOrigin parameter can be used to specify a global origin rect for the share sheet to popover from on iPads and Macs. It has no effect on other devices.

May throw PlatformException from MethodChannel.

See documentation about ShareResult on share method.

Implementation

static Future<ShareResult> shareUri(
  Uri uri, {
  Rect? sharePositionOrigin,
}) async {
  return _platform.shareUri(
    uri,
    sharePositionOrigin: sharePositionOrigin,
  );
}