Reputation: 135
I'm trying to send an SMS from my flutter app when a user wants to interact with another user. I already have the phone number and I know I can open the SMS window using url_launcher package but that package doesn't let me add my own custom message to it. I do not want the text to be automatically sent though.
Basically what I want is when the url_launcher launches the SMS window, there is already a custom message that I have provided, so that the user can add on or remove stuff if they want to and then send the text themselves.
Thanks a lot!
Upvotes: 0
Views: 2935
Reputation: 1
You can still use the url_launcher to do this, set your url like this:
var url = 'sms:''?body=Sample text message';
Upvotes: 0
Reputation: 1618
Try https://pub.dev/packages/flutter_sms.
It allows opening an SMS app with prepopulated phone and text fields.
Upvotes: 0
Reputation: 369
Maybe the SMS package helps. You are able to send SMS directly.
UPDATE This post might be a solution to set the text without sending.
Upvotes: 1