shareSms static method

Future<String?> shareSms(
  1. String message, {
  2. String? url,
  3. String? trailingText,
})

Implementation

static Future<String?> shareSms(String message,
    {String? url, String? trailingText}) async {
  Map<String, dynamic>? args;
  if (Platform.isIOS) {
    if (url == null) {
      args = <String, dynamic>{
        "message": message,
      };
    } else {
      args = <String, dynamic>{
        "message": message + " ",
        "urlLink": Uri.parse(url).toString(),
        "trailingText": trailingText
      };
    }
  } else if (Platform.isAndroid) {
    args = <String, dynamic>{
      "message": message + (url ?? '') + (trailingText ?? ''),
    };
  }
  final String? version = await _channel.invokeMethod('shareSms', args);
  return version;
}