shareText static method

Future<ShareResult?> shareText(
  1. String text, {
  2. String? subject,
  3. Rect? sharePositionOrigin,
})

Implementation

static Future<ShareResult?> shareText(
  String text, {
  String? subject,
  Rect? sharePositionOrigin,
}) async {
  try {
    return await Share.shareWithResult(text, subject: subject, sharePositionOrigin: sharePositionOrigin);
  } catch (e) {
    LoggerService.logError('Error sharing text: $e');
    return null;
  }
}