Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[url_launcher] forceSafariVC should be nullable to avoid breaking change #3354

Merged
merged 2 commits into from
Dec 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.0.0-nullsafety.3

* forceSafariVC should be nullable.

## 6.0.0-nullsafety.2

* Fix outdated links across a number of markdown files ([#3276](https://github.com/flutter/plugins/pull/3276))
Expand Down
4 changes: 2 additions & 2 deletions packages/url_launcher/url_launcher/lib/url_launcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import 'package:url_launcher_platform_interface/url_launcher_platform_interface.
/// is set to true and the universal link failed to launch.
Future<bool> launch(
String urlString, {
bool forceSafariVC = true,
bool? forceSafariVC,
bool forceWebView = false,
bool enableJavaScript = false,
bool enableDomStorage = false,
Expand Down Expand Up @@ -95,7 +95,7 @@ Future<bool> launch(

final bool result = await UrlLauncherPlatform.instance.launch(
urlString,
useSafariVC: forceSafariVC,
useSafariVC: forceSafariVC ?? isWebURL,
useWebView: forceWebView,
enableJavaScript: enableJavaScript,
enableDomStorage: enableDomStorage,
Expand Down
2 changes: 1 addition & 1 deletion packages/url_launcher/url_launcher/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: url_launcher
description: Flutter plugin for launching a URL on Android and iOS. Supports
web, phone, SMS, and email schemes.
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher
version: 6.0.0-nullsafety.2
version: 6.0.0-nullsafety.3

flutter:
plugin:
Expand Down