File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ enum BrowserPreference {
45
45
}
46
46
47
47
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] .
48
52
BrowserPreference get effectiveBrowserPreference {
49
53
if (browserPreference != null ) return browserPreference! ;
50
54
return switch (defaultTargetPlatform) {
@@ -61,6 +65,8 @@ extension GlobalSettingsHelpers on GlobalSettingsData {
61
65
};
62
66
}
63
67
68
+ /// The launch mode to use with `url_launcher` ,
69
+ /// based on the user's choice in [browserPreference] .
64
70
UrlLaunchMode getUrlLaunchMode (Uri url) {
65
71
switch (effectiveBrowserPreference) {
66
72
case BrowserPreference .inApp:
You can’t perform that action at this time.
0 commit comments