Open patron page in external browser - #3355
Open
sawirricardo wants to merge 1 commit into
Open
Conversation
sawirricardo
marked this pull request as ready for review
June 19, 2026 10:46
veloce
reviewed
Jun 19, 2026
Contributor
There was a problem hiding this comment.
launch.dart is not a very clear, better name it launch_url.dart so we know what it is about.
| @@ -0,0 +1,13 @@ | |||
| import 'package:url_launcher/url_launcher.dart'; | |||
|
|
|||
| const _patronUri = 'https://lichess.org/patron'; | |||
Contributor
There was a problem hiding this comment.
You could also declare a final and parse it once for all:
Suggested change
| const _patronUri = 'https://lichess.org/patron'; | |
| final _patronUri = Uri.parse('https://lichess.org/patron'); |
Contributor
There was a problem hiding this comment.
Also rename it to launch_uri_test.dart
Contributor
|
@sawirricardo if you were able to reproduce this behaviour, I'd like to see a screenshot/screen recording of it. Thank you! |
dev-shady
reviewed
Jun 23, 2026
| title: Text(context.l10n.patronDonate), | ||
| enabled: isOnline, | ||
| onTap: () => launchUrl(Uri.parse('https://lichess.org/patron')), | ||
| onTap: () => launchPatronPage(), |
Contributor
There was a problem hiding this comment.
Since launchPatronPage has only optional parameters, I think we can remove closure wrapper ( () => ) . Avoiding unnecessary object instantiations on every widget build pass.
onTap: launchPatronPage
We can do the same in other invocations as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3345
Testing
flutter analyze lib/src/utils/launch.dart lib/src/view/home/home_tab_screen.dart lib/src/view/more/more_tab_screen.dart lib/src/view/account/account_menu.dart test/utils/launch_test.dartflutter test test/utils/launch_test.dart