Skip to content

Commit ec12ce9

Browse files
mehmetfadsonpleal
authored andcommitted
[url_launcher] forceSafariVC should be nullable to avoid breaking change (flutter#3354)
1 parent 0a8c928 commit ec12ce9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/url_launcher/url_launcher/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.0.0-nullsafety.3
2+
3+
* forceSafariVC should be nullable.
4+
15
## 6.0.0-nullsafety.2
26

37
* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))

packages/url_launcher/url_launcher/lib/url_launcher.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import 'package:url_launcher_platform_interface/url_launcher_platform_interface.
6262
/// is set to true and the universal link failed to launch.
6363
Future<bool> launch(
6464
String urlString, {
65-
bool forceSafariVC = true,
65+
bool? forceSafariVC,
6666
bool forceWebView = false,
6767
bool enableJavaScript = false,
6868
bool enableDomStorage = false,
@@ -95,7 +95,7 @@ Future<bool> launch(
9595

9696
final bool result = await UrlLauncherPlatform.instance.launch(
9797
urlString,
98-
useSafariVC: forceSafariVC,
98+
useSafariVC: forceSafariVC ?? isWebURL,
9999
useWebView: forceWebView,
100100
enableJavaScript: enableJavaScript,
101101
enableDomStorage: enableDomStorage,

packages/url_launcher/url_launcher/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: url_launcher
22
description: Flutter plugin for launching a URL on Android and iOS. Supports
33
web, phone, SMS, and email schemes.
44
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher
5-
version: 6.0.0-nullsafety.2
5+
version: 6.0.0-nullsafety.3
66

77
flutter:
88
plugin:

0 commit comments

Comments
 (0)