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
CodePudding user response:
If you want to open the file in the browser use url_launcher packages : url_launcher
_launchURL(String url) async {
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
