Skip to content

Commit

Permalink
[webview_flutter_wkwebview] Raise minimum Dart and Flutter version to…
Browse files Browse the repository at this point in the history
… 2.17 and 3.0.0, respectively. (flutter#5850)
  • Loading branch information
bparrishMines authored and mvanbeusekom committed Jul 19, 2022
1 parent 9c481a4 commit b1929b3
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 55 deletions.
@@ -1,3 +1,7 @@
## 2.8.0

* Raises minimum Dart version to 2.17 and Flutter version to 3.0.0.

## 2.7.5

* Minor fixes for new analysis options.
Expand Down
Expand Up @@ -89,10 +89,9 @@ class FoundationFlutterApis {
class NSObjectHostApiImpl extends NSObjectHostApi {
/// Constructs an [NSObjectHostApiImpl].
NSObjectHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down
Expand Up @@ -6,7 +6,6 @@ import 'dart:async';
import 'dart:math';

import 'package:flutter/painting.dart' show Color;
import 'package:flutter/services.dart';

import '../common/instance_manager.dart';
import '../common/web_kit.pigeon.dart';
Expand All @@ -17,10 +16,9 @@ import 'ui_kit.dart';
class UIScrollViewHostApiImpl extends UIScrollViewHostApi {
/// Constructs a [UIScrollViewHostApiImpl].
UIScrollViewHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -75,10 +73,9 @@ class UIScrollViewHostApiImpl extends UIScrollViewHostApi {
class UIViewHostApiImpl extends UIViewHostApi {
/// Constructs a [UIViewHostApiImpl].
UIViewHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down
Expand Up @@ -600,13 +600,9 @@ class WKUIDelegate {
class WKNavigationDelegate extends NSObject {
/// Constructs a [WKNavigationDelegate].
WKNavigationDelegate({
BinaryMessenger? binaryMessenger,
InstanceManager? instanceManager,
}) : _navigationDelegateApi = WKNavigationDelegateHostApiImpl(
binaryMessenger: binaryMessenger,
instanceManager: instanceManager,
),
super(
super.binaryMessenger,
super.instanceManager,
}) : _navigationDelegateApi = WKNavigationDelegateHostApiImpl(
binaryMessenger: binaryMessenger,
instanceManager: instanceManager,
) {
Expand Down Expand Up @@ -682,17 +678,13 @@ class WKWebView extends UIView {
/// configuration object.
WKWebView(
WKWebViewConfiguration configuration, {
BinaryMessenger? binaryMessenger,
InstanceManager? instanceManager,
super.binaryMessenger,
super.instanceManager,
}) : _binaryMessenger = binaryMessenger,
_instanceManager = instanceManager,
_webViewApi = WKWebViewHostApiImpl(
binaryMessenger: binaryMessenger,
instanceManager: instanceManager,
),
super(
binaryMessenger: binaryMessenger,
instanceManager: instanceManager,
) {
_webViewApi.createForInstances(this, configuration);
}
Expand Down
Expand Up @@ -224,10 +224,9 @@ class WebKitFlutterApis {
class WKWebsiteDataStoreHostApiImpl extends WKWebsiteDataStoreHostApi {
/// Constructs a [WebsiteDataStoreHostApiImpl].
WKWebsiteDataStoreHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -269,10 +268,9 @@ class WKWebsiteDataStoreHostApiImpl extends WKWebsiteDataStoreHostApi {
class WKScriptMessageHandlerHostApiImpl extends WKScriptMessageHandlerHostApi {
/// Constructs a [WKScriptMessageHandlerHostApiImpl].
WKScriptMessageHandlerHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand All @@ -287,10 +285,9 @@ class WKScriptMessageHandlerHostApiImpl extends WKScriptMessageHandlerHostApi {
class WKPreferencesHostApiImpl extends WKPreferencesHostApi {
/// Constructs a [WKPreferencesHostApiImpl].
WKPreferencesHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -322,10 +319,9 @@ class WKPreferencesHostApiImpl extends WKPreferencesHostApi {
class WKHttpCookieStoreHostApiImpl extends WKHttpCookieStoreHostApi {
/// Constructs a [WKHttpCookieStoreHostApiImpl].
WKHttpCookieStoreHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -358,10 +354,9 @@ class WKUserContentControllerHostApiImpl
extends WKUserContentControllerHostApi {
/// Constructs a [WKUserContentControllerHostApiImpl].
WKUserContentControllerHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -433,10 +428,9 @@ class WKUserContentControllerHostApiImpl
class WKWebViewConfigurationHostApiImpl extends WKWebViewConfigurationHostApi {
/// Constructs a [WKWebViewConfigurationHostApiImpl].
WKWebViewConfigurationHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -484,10 +478,9 @@ class WKWebViewConfigurationHostApiImpl extends WKWebViewConfigurationHostApi {
class WKUIDelegateHostApiImpl extends WKUIDelegateHostApi {
/// Constructs a [WKUIDelegateHostApiImpl].
WKUIDelegateHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand All @@ -502,10 +495,9 @@ class WKUIDelegateHostApiImpl extends WKUIDelegateHostApi {
class WKNavigationDelegateHostApiImpl extends WKNavigationDelegateHostApi {
/// Constructs a [WKNavigationDelegateHostApiImpl].
WKNavigationDelegateHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down Expand Up @@ -561,10 +553,9 @@ class WKNavigationDelegateFlutterApiImpl
class WKWebViewHostApiImpl extends WKWebViewHostApi {
/// Constructs a [WKWebViewHostApiImpl].
WKWebViewHostApiImpl({
BinaryMessenger? binaryMessenger,
super.binaryMessenger,
InstanceManager? instanceManager,
}) : instanceManager = instanceManager ?? InstanceManager.instance,
super(binaryMessenger: binaryMessenger);
}) : instanceManager = instanceManager ?? InstanceManager.instance;

/// Maintains instances stored to communicate with Objective-C objects.
final InstanceManager instanceManager;
Expand Down
Expand Up @@ -18,14 +18,14 @@ import 'web_kit/web_kit.dart';
class WebKitWebViewWidget extends StatefulWidget {
/// Constructs a [WebKitWebViewWidget].
const WebKitWebViewWidget({
Key? key,
super.key,
required this.creationParams,
required this.callbacksHandler,
required this.javascriptChannelRegistry,
required this.onBuildWidget,
this.configuration,
@visibleForTesting this.webViewProxy = const WebViewWidgetProxy(),
}) : super(key: key);
});

/// The initial parameters used to setup the WebView.
final CreationParams creationParams;
Expand Down
Expand Up @@ -2,11 +2,11 @@ name: webview_flutter_wkwebview
description: A Flutter plugin that provides a WebView widget based on Apple's WKWebView control.
repository: https://github.com/flutter/plugins/tree/main/packages/webview_flutter/webview_flutter_wkwebview
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 2.7.5
version: 2.8.0

environment:
sdk: ">=2.14.0 <3.0.0"
flutter: ">=2.8.0"
sdk: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"

flutter:
plugin:
Expand Down

0 comments on commit b1929b3

Please sign in to comment.