shareText function
origin anchors the sheet so iPad's popover-based presentation doesn't crash.
Implementation
Future<void> shareText(String text, {Rect? origin}) async {
await SharePlus.instance.share(
ShareParams(text: text, sharePositionOrigin: origin),
);
}