Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
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 @@
## 5.4.6

* Remove deprecation warnings on Android.

## 5.4.5

* Remove Android dependencies fallback.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.RequiresApi;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -39,19 +40,19 @@ public void onReceive(Context context, Intent intent) {
new WebViewClient() {

@Override
@SuppressWarnings("deprecation")
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
view.loadUrl(url);
return false;
}
return super.shouldOverrideUrlLoading(view, url);
}

@Override
@RequiresApi(Build.VERSION_CODES.N)
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
view.loadUrl(request.getUrl().toString());
}
view.loadUrl(request.getUrl().toString());
return false;
}
};
Expand Down Expand Up @@ -89,7 +90,9 @@ private Map<String, String> extractHeaders(Bundle headersBundle) {
final Map<String, String> headersMap = new HashMap<>();
for (String key : headersBundle.keySet()) {
final String value = headersBundle.getString(key);
headersMap.put(key, value);
if (value != null) {
headersMap.put(key, value);
}
Comment on lines -92 to +95
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Android Studio suggested this change as value may not be initialized.

}
return headersMap;
}
Expand Down
4 changes: 2 additions & 2 deletions 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: 5.4.5
version: 5.4.6

flutter:
plugin:
Expand Down Expand Up @@ -38,5 +38,5 @@ dev_dependencies:
pedantic: ^1.8.0

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher_macos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.0.1+7

* Bump minimum versions from Flutter to `1.12.13+hotfix.5` and Dart to `2.7.0`.

# 0.0.1+6

* Declare API stability and compatibility with `1.0.0` (more details at: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0).
Expand Down
6 changes: 3 additions & 3 deletions packages/url_launcher/url_launcher_macos/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: macOS implementation of the url_launcher plugin.
# 0.0.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.0.1+6
version: 0.0.1+7
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_macos

flutter:
Expand All @@ -14,8 +14,8 @@ flutter:
fileName: url_launcher_macos.dart

environment:
sdk: ">=2.1.0 <3.0.0"
flutter: ">=1.12.8 <2.0.0"
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.7

* Bump minimum versions from Flutter to `1.12.13+hotfix.5` and Dart to `2.7.0`.

## 1.0.6

* Make the pedantic dev_dependency explicit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the url_launcher plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/url_launcher_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 1.0.6
version: 1.0.7

dependencies:
flutter:
Expand All @@ -18,5 +18,5 @@ dev_dependencies:
pedantic: ^1.8.0

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.9.1+hotfix.4 <2.0.0"
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
4 changes: 4 additions & 0 deletions packages/url_launcher/url_launcher_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.1+5

* Bump minimum versions from Flutter to `1.12.13+hotfix.5` and Dart to `2.7.0`.

# 0.1.1+4

* Declare API stability and compatibility with `1.0.0` (more details at: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0).
Expand Down
6 changes: 3 additions & 3 deletions packages/url_launcher/url_launcher_web/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ homepage: https://github.com/flutter/plugins/tree/master/packages/url_launcher/u
# 0.1.y+z is compatible with 1.0.0, if you land a breaking change bump
# the version to 2.0.0.
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
version: 0.1.1+4
version: 0.1.1+5

flutter:
plugin:
Expand All @@ -30,5 +30,5 @@ dev_dependencies:
mockito: ^4.1.1

environment:
sdk: ">=2.0.0-dev.28.0 <3.0.0"
flutter: ">=1.10.0 <2.0.0"
sdk: ">=2.7.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"