I'm using url_launcher: ^5.7.5 and when i'm passing a pdf url in the launch function it it keeps downloading the pdf instead of opening it on my browser,
onTap: () async {
url="http://3.65.45.149/uploads/store/vendor_report/vendor_pickup_report_257.pdf";
if (await canLaunch(url)){
await launch(url,
headers: { "Content-Type":"application/pdf",
"Content-Disposition":"inline"}, );
print("browser url");
print(url);
}
else
// can't launch url, there is some error
throw "Could not launch $url";
},