launchSms method

Future<bool> launchSms(
  1. String? number, [
  2. String? body
])

Implementation

Future<bool> launchSms(String? number, [String? body]) {
  number ??= '';
  if (body != null) {
    final _body = Uri.encodeComponent(body);
    return launchUrl(Uri.parse('sms:/$number${separator}body=$_body'));
  }
  return launchUrl(Uri.parse('sms:/$number'));
}