Skip to content

Commit 0497088

Browse files
committed
settings [nfc]: Write docs on extension members
1 parent 3cf002e commit 0497088

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/model/settings.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ enum BrowserPreference {
4545
}
4646

4747
extension GlobalSettingsHelpers on GlobalSettingsData {
48+
/// The value of [BrowserPreference] to use:
49+
/// the user's choice [browserPreference] if any, else our default.
50+
///
51+
/// See also [getUrlLaunchMode].
4852
BrowserPreference get effectiveBrowserPreference {
4953
if (browserPreference != null) return browserPreference!;
5054
return switch (defaultTargetPlatform) {
@@ -61,6 +65,8 @@ extension GlobalSettingsHelpers on GlobalSettingsData {
6165
};
6266
}
6367

68+
/// The launch mode to use with `url_launcher`,
69+
/// based on the user's choice in [browserPreference].
6470
UrlLaunchMode getUrlLaunchMode(Uri url) {
6571
switch (effectiveBrowserPreference) {
6672
case BrowserPreference.inApp:

0 commit comments

Comments
 (0)