79796666

Date: 2025-10-22 10:38:32
Score: 1
Natty:
Report link

Just use the url_launcher package from pub.dev

Future openApp() async{

final String filePath = "C:/Home/filepath.exe";
final Uri uri = Uri.file(filePath);

if (!File(uri.toFilePath()).existsSync()) {
  throw Exception('$uri does not exist!');
}
if (!await launchUrl(uri)) {
  throw Exception('Could not launch $uri');
}
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Darius Tron