jesusrp98 / spacex-go

Simple yet powerful, open-source SpaceX launch tracker.
https://play.google.com/store/apps/details?id=com.chechu.cherry
GNU General Public License v3.0
880 stars 252 forks source link

Improve URL handling #116

Closed jesusrp98 closed 3 years ago

jesusrp98 commented 3 years ago

Implement a feature that allows the user to open an URL with the in-app browser or rarher the system default one provided by the OS.

m0veax commented 3 years ago

https://github.com/jesusrp98/spacex-go/blob/807152bd0111720848f0156749b0fbc42fc19aaa/lib/util/browser.dart#L3

I think about tinkering this function. A setting could be checked here and then we can open the system default browser.

If it is okay for you to add another dependency, we can use the following plugin:

https://pub.dev/packages/url_launcher

Otherwise I can take a look into the plugin source and implement the feature by myself

jesusrp98 commented 3 years ago

I'm currently using the flutter_web_browser package, which internally depends on url_launcher so we don't need to add any new dependency.

For storaging the setting, we should do something very similar to the ImageQuality setting, storaging the state with shared_preferences and accessing the data with provider down the widget tree.

m0veax commented 3 years ago

Thanks for your input.

I had an eye on the image quality setting too and will adapt the code.

At the moment I can't work on this, but I hope to find time for it the next weeks.

Jesús Rodríguez notifications@github.com schrieb am Mi., 13. Jan. 2021, 11:30:

I'm currently using the flutter_web_browser package, which internally depends on url_launcher so we don't need to add any new dependency.

For storaging the setting, we should do something very similar to the ImageQuality setting, storaging the state with shared_preferences and accessing the data with provider down the widget tree.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jesusrp98/spacex-go/issues/116#issuecomment-759357612, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ2MCIEHYSMPQ3JVCKXQGDSZVY3NANCNFSM4V7L5YLA .