victorbonnet / flutter_web_browser

Plugin for flutter to open web page with Chrome Custom Tabs and SFSafariViewController
MIT License
62 stars 39 forks source link

Upgrade Android Browser library and replace deprecated method usages #38

Closed Mosc closed 2 years ago

Mosc commented 2 years ago

Upgrading the Jetpack Browser library for Android fixes not being able to show a share button in Firefox. This is due to Firefox only caring about setShareState, not the deprecated addDefaultShareMenuItem. To maintain backwards-compatibility I've kept the latter field in this package but marked it as deprecated.

Note that CustomTabsShareState.default_ has a funny looking trailing underscore because default is a Dart keyword.

ened commented 2 years ago

IIRC the new jetpack version also includes support for light/dark theming. Is this something you could add as well?

Mosc commented 2 years ago

I'll give it a try and add navigationBarDividerColor while I'm at it. It doesn't really belong in this PR especially because light/dark theming was already present in version 1.2.0 of the library, but I don't mind extending the scope a bit.

ened commented 2 years ago

Ah hold on @Mosc, if that is the case perhaps it really belongs to a separate PR. Adding navigationBarDividerColor should be separate, too - smaller PRs are easier to review. @victorbonnet what is your take?

Mosc commented 2 years ago

I agree with you in principle that smaller PRs are better, but given how the proposed changes are not completely independent from each other I can't just offer several PRs simultaneously. If the turnaround time from @victorbonnet is on the longer end, I'd prefer to just get it over with in one PR.

Mosc commented 2 years ago

I've pushed some more improvements based on the updated Browser library. I would have preferred to offer these in separate PRs, but I don't think it makes sense to keep these changes locally forever.

ened commented 2 years ago

@victorbonnet ready to merge?

victorbonnet commented 2 years ago

Sorry It took me long to merge it. The PR looks good, I will update the version soon