Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

the fileUrl file does not exists in flutter

I want to open a file url in browser but the issue I am facing is that the file fileUrl does not exists. But when I paste that url in browser it opens the file.

 final msg = await OpenFile.open(message.uri);
  log("msg result =${msg.message.toString()}");

output: msg result = the file fileurl does not exist

the url is : Url

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you want to open the file in the browser use url_launcher packages : url_launcher

const url = message.uri;
if (await canLaunch(url))
  await launch(url);
else 
  // can't launch url, there is some error
  throw "Could not launch $url";
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading