Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open file by default application flutter

How to open a file by default application using flutter? For example, I have a .txt file and want to open it using the device's default application. I think that there should be something like Process.Start() from .Net.

like image 476
Ruben Martirosyan Avatar asked Dec 10 '22 04:12

Ruben Martirosyan


1 Answers

open_file plugin helped, nevermind.


Update from Vishnu Haridas comment:

open_file has unnecessary permission REQUEST_INSTALL_PACKAGES and your app can get rejected from Google Play if the target API level is 30 (Android 11 R). An alternative solution is to use open_file_plus or url_launcher.

like image 85
Ruben Martirosyan Avatar answered Feb 13 '23 05:02

Ruben Martirosyan