I'm trying to use the Flutter url_launcher package to create a feedback form template. It worked well so far but I recently did a major package versioning upgrade and now it seems like something is going wrong in the translation of the placeholders.
final Uri _emailLaunchUri = Uri(
scheme: 'mailto',
path: recipient,
queryParameters: {
'subject': subject,
'body': body,
},
);
var newurl = _emailLaunchUri.toString();
return newurl;
The upper is my chunk of code to generate the uri and eventually return the new launch url including some Device information. Printing it out leads to the following output in the console:
mailto:support@support.de?subject=Feedback%3A+App+Name%28Subtitle%29&body=Dear+developers%2C%0D%0A%0D%0AiOS+version%3A+14.6%0D%0Amodel%3A+iPhone11%2C8%0D%0A
So far so good I guess, but that's how it ends up to look in my app (tested on a physical iPhone):
Is there anything I miss or that Apple might have changed in the recent iOS versions? My iPhone is using version 14.6. I figured out to replace the "+" with a %20
instead (seems to be a package error), but I'm not sure how to convert the line breaks correctly.
Would appreciate any help.