fixed remaining classes and properties
This commit is contained in:
parent
cdd2bdb09f
commit
0312d12859
|
@ -31,7 +31,7 @@ import com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebView;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebViewChromeClient;
|
import com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebViewChromeClient;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebViewSettings;
|
import com.pichillilorenzo.flutter_inappwebview.in_app_webview.InAppWebViewSettings;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshLayout;
|
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshLayout;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshOptions;
|
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshSettings;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.types.URLRequest;
|
import com.pichillilorenzo.flutter_inappwebview.types.URLRequest;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.types.UserScript;
|
import com.pichillilorenzo.flutter_inappwebview.types.UserScript;
|
||||||
|
|
||||||
|
@ -81,13 +81,13 @@ public class InAppBrowserActivity extends AppCompatActivity implements InAppBrow
|
||||||
|
|
||||||
setContentView(R.layout.activity_web_view);
|
setContentView(R.layout.activity_web_view);
|
||||||
|
|
||||||
Map<String, Object> pullToRefreshInitialOptions = (Map<String, Object>) b.getSerializable("pullToRefreshInitialOptions");
|
Map<String, Object> pullToRefreshInitialSettings = (Map<String, Object>) b.getSerializable("pullToRefreshInitialSettings");
|
||||||
MethodChannel pullToRefreshLayoutChannel = new MethodChannel(manager.plugin.messenger, "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + id);
|
MethodChannel pullToRefreshLayoutChannel = new MethodChannel(manager.plugin.messenger, "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + id);
|
||||||
PullToRefreshOptions pullToRefreshOptions = new PullToRefreshOptions();
|
PullToRefreshSettings pullToRefreshSettings = new PullToRefreshSettings();
|
||||||
pullToRefreshOptions.parse(pullToRefreshInitialOptions);
|
pullToRefreshSettings.parse(pullToRefreshInitialSettings);
|
||||||
pullToRefreshLayout = findViewById(R.id.pullToRefresh);
|
pullToRefreshLayout = findViewById(R.id.pullToRefresh);
|
||||||
pullToRefreshLayout.channel = pullToRefreshLayoutChannel;
|
pullToRefreshLayout.channel = pullToRefreshLayoutChannel;
|
||||||
pullToRefreshLayout.options = pullToRefreshOptions;
|
pullToRefreshLayout.options = pullToRefreshSettings;
|
||||||
pullToRefreshLayout.prepare();
|
pullToRefreshLayout.prepare();
|
||||||
|
|
||||||
webView = findViewById(R.id.webView);
|
webView = findViewById(R.id.webView);
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class InAppBrowserManager implements MethodChannel.MethodCallHandler {
|
||||||
Map<String, Object> contextMenu = (Map<String, Object>) arguments.get("contextMenu");
|
Map<String, Object> contextMenu = (Map<String, Object>) arguments.get("contextMenu");
|
||||||
Integer windowId = (Integer) arguments.get("windowId");
|
Integer windowId = (Integer) arguments.get("windowId");
|
||||||
List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) arguments.get("initialUserScripts");
|
List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) arguments.get("initialUserScripts");
|
||||||
Map<String, Object> pullToRefreshInitialOptions = (Map<String, Object>) arguments.get("pullToRefreshOptions");
|
Map<String, Object> pullToRefreshInitialSettings = (Map<String, Object>) arguments.get("pullToRefreshSettings");
|
||||||
|
|
||||||
Bundle extras = new Bundle();
|
Bundle extras = new Bundle();
|
||||||
extras.putString("fromActivity", activity.getClass().getName());
|
extras.putString("fromActivity", activity.getClass().getName());
|
||||||
|
@ -191,7 +191,7 @@ public class InAppBrowserManager implements MethodChannel.MethodCallHandler {
|
||||||
extras.putSerializable("contextMenu", (Serializable) contextMenu);
|
extras.putSerializable("contextMenu", (Serializable) contextMenu);
|
||||||
extras.putInt("windowId", windowId != null ? windowId : -1);
|
extras.putInt("windowId", windowId != null ? windowId : -1);
|
||||||
extras.putSerializable("initialUserScripts", (Serializable) initialUserScripts);
|
extras.putSerializable("initialUserScripts", (Serializable) initialUserScripts);
|
||||||
extras.putSerializable("pullToRefreshInitialOptions", (Serializable) pullToRefreshInitialOptions);
|
extras.putSerializable("pullToRefreshInitialSettings", (Serializable) pullToRefreshInitialSettings);
|
||||||
startInAppBrowserActivity(activity, extras);
|
startInAppBrowserActivity(activity, extras);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import com.pichillilorenzo.flutter_inappwebview.InAppWebViewFlutterPlugin;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewMethodHandler;
|
import com.pichillilorenzo.flutter_inappwebview.InAppWebViewMethodHandler;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.plugin_scripts_js.JavaScriptBridgeJS;
|
import com.pichillilorenzo.flutter_inappwebview.plugin_scripts_js.JavaScriptBridgeJS;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshLayout;
|
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshLayout;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshOptions;
|
import com.pichillilorenzo.flutter_inappwebview.pull_to_refresh.PullToRefreshSettings;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.types.PlatformWebView;
|
import com.pichillilorenzo.flutter_inappwebview.types.PlatformWebView;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.types.URLRequest;
|
import com.pichillilorenzo.flutter_inappwebview.types.URLRequest;
|
||||||
import com.pichillilorenzo.flutter_inappwebview.types.UserScript;
|
import com.pichillilorenzo.flutter_inappwebview.types.UserScript;
|
||||||
|
@ -55,7 +55,7 @@ public class FlutterWebView implements PlatformWebView {
|
||||||
Map<String, Object> contextMenu = (Map<String, Object>) params.get("contextMenu");
|
Map<String, Object> contextMenu = (Map<String, Object>) params.get("contextMenu");
|
||||||
Integer windowId = (Integer) params.get("windowId");
|
Integer windowId = (Integer) params.get("windowId");
|
||||||
List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) params.get("initialUserScripts");
|
List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) params.get("initialUserScripts");
|
||||||
Map<String, Object> pullToRefreshInitialOptions = (Map<String, Object>) params.get("pullToRefreshOptions");
|
Map<String, Object> pullToRefreshInitialSettings = (Map<String, Object>) params.get("pullToRefreshSettings");
|
||||||
|
|
||||||
InAppWebViewSettings options = new InAppWebViewSettings();
|
InAppWebViewSettings options = new InAppWebViewSettings();
|
||||||
options.parse(initialSettings);
|
options.parse(initialSettings);
|
||||||
|
@ -81,9 +81,9 @@ public class FlutterWebView implements PlatformWebView {
|
||||||
// set MATCH_PARENT layout params to the WebView, otherwise it won't take all the available space!
|
// set MATCH_PARENT layout params to the WebView, otherwise it won't take all the available space!
|
||||||
webView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
webView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
||||||
MethodChannel pullToRefreshLayoutChannel = new MethodChannel(plugin.messenger, "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + id);
|
MethodChannel pullToRefreshLayoutChannel = new MethodChannel(plugin.messenger, "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + id);
|
||||||
PullToRefreshOptions pullToRefreshOptions = new PullToRefreshOptions();
|
PullToRefreshSettings pullToRefreshSettings = new PullToRefreshSettings();
|
||||||
pullToRefreshOptions.parse(pullToRefreshInitialOptions);
|
pullToRefreshSettings.parse(pullToRefreshInitialSettings);
|
||||||
pullToRefreshLayout = new PullToRefreshLayout(context, pullToRefreshLayoutChannel, pullToRefreshOptions);
|
pullToRefreshLayout = new PullToRefreshLayout(context, pullToRefreshLayoutChannel, pullToRefreshSettings);
|
||||||
pullToRefreshLayout.addView(webView);
|
pullToRefreshLayout.addView(webView);
|
||||||
pullToRefreshLayout.prepare();
|
pullToRefreshLayout.prepare();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,9 @@ public class PullToRefreshLayout extends SwipeRefreshLayout implements MethodCha
|
||||||
static final String LOG_TAG = "PullToRefreshLayout";
|
static final String LOG_TAG = "PullToRefreshLayout";
|
||||||
|
|
||||||
public MethodChannel channel;
|
public MethodChannel channel;
|
||||||
public PullToRefreshOptions options;
|
public PullToRefreshSettings options;
|
||||||
|
|
||||||
public PullToRefreshLayout(@NonNull Context context, @NonNull MethodChannel channel, @NonNull PullToRefreshOptions options) {
|
public PullToRefreshLayout(@NonNull Context context, @NonNull MethodChannel channel, @NonNull PullToRefreshSettings options) {
|
||||||
super(context);
|
super(context);
|
||||||
this.channel = channel;
|
this.channel = channel;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
|
|
@ -7,8 +7,8 @@ import com.pichillilorenzo.flutter_inappwebview.IWebViewSettings;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class PullToRefreshOptions implements IWebViewSettings<PullToRefreshLayout> {
|
public class PullToRefreshSettings implements IWebViewSettings<PullToRefreshLayout> {
|
||||||
public static final String LOG_TAG = "PullToRefreshOptions";
|
public static final String LOG_TAG = "PullToRefreshSettings";
|
||||||
|
|
||||||
public Boolean enabled = true;
|
public Boolean enabled = true;
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -22,7 +22,7 @@ public class PullToRefreshOptions implements IWebViewSettings<PullToRefreshLayou
|
||||||
@Nullable
|
@Nullable
|
||||||
public Integer size;
|
public Integer size;
|
||||||
|
|
||||||
public PullToRefreshOptions parse(Map<String, Object> options) {
|
public PullToRefreshSettings parse(Map<String, Object> options) {
|
||||||
for (Map.Entry<String, Object> pair : options.entrySet()) {
|
for (Map.Entry<String, Object> pair : options.entrySet()) {
|
||||||
String key = pair.getKey();
|
String key = pair.getKey();
|
||||||
Object value = pair.getValue();
|
Object value = pair.getValue();
|
||||||
|
@ -56,20 +56,20 @@ public class PullToRefreshOptions implements IWebViewSettings<PullToRefreshLayou
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> toMap() {
|
public Map<String, Object> toMap() {
|
||||||
Map<String, Object> options = new HashMap<>();
|
Map<String, Object> settings = new HashMap<>();
|
||||||
options.put("enabled", enabled);
|
settings.put("enabled", enabled);
|
||||||
options.put("color", color);
|
settings.put("color", color);
|
||||||
options.put("backgroundColor", backgroundColor);
|
settings.put("backgroundColor", backgroundColor);
|
||||||
options.put("distanceToTriggerSync", distanceToTriggerSync);
|
settings.put("distanceToTriggerSync", distanceToTriggerSync);
|
||||||
options.put("slingshotDistance", slingshotDistance);
|
settings.put("slingshotDistance", slingshotDistance);
|
||||||
options.put("size", size);
|
settings.put("size", size);
|
||||||
return options;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getRealSettings(PullToRefreshLayout pullToRefreshLayout) {
|
public Map<String, Object> getRealSettings(PullToRefreshLayout pullToRefreshLayout) {
|
||||||
Map<String, Object> realOptions = toMap();
|
Map<String, Object> realSettings = toMap();
|
||||||
return realOptions;
|
return realSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
#
|
||||||
|
# NOTE: This podspec is NOT to be published. It is only used as a local source!
|
||||||
|
# This is a generated file; do not edit or check into version control.
|
||||||
|
#
|
||||||
|
|
||||||
|
Pod::Spec.new do |s|
|
||||||
|
s.name = 'Flutter'
|
||||||
|
s.version = '1.0.0'
|
||||||
|
s.summary = 'High-performance, high-fidelity mobile apps.'
|
||||||
|
s.homepage = 'https://flutter.io'
|
||||||
|
s.license = { :type => 'MIT' }
|
||||||
|
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
|
||||||
|
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
|
||||||
|
s.ios.deployment_target = '9.0'
|
||||||
|
# Framework linking is handled by Flutter tooling, not CocoaPods.
|
||||||
|
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
|
||||||
|
s.vendored_frameworks = 'path/to/nothing'
|
||||||
|
end
|
|
@ -3,11 +3,12 @@
|
||||||
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4"
|
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4"
|
||||||
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
|
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
|
||||||
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
|
||||||
export "FLUTTER_TARGET=lib/main.dart"
|
export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/lib/main.dart"
|
||||||
export "FLUTTER_BUILD_DIR=build"
|
export "FLUTTER_BUILD_DIR=build"
|
||||||
export "FLUTTER_BUILD_NAME=1.0.0"
|
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||||
export "FLUTTER_BUILD_NUMBER=1"
|
export "FLUTTER_BUILD_NUMBER=1"
|
||||||
|
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
|
||||||
export "DART_OBFUSCATION=false"
|
export "DART_OBFUSCATION=false"
|
||||||
export "TRACK_WIDGET_CREATION=false"
|
export "TRACK_WIDGET_CREATION=true"
|
||||||
export "TREE_SHAKE_ICONS=false"
|
export "TREE_SHAKE_ICONS=false"
|
||||||
export "PACKAGE_CONFIG=.packages"
|
export "PACKAGE_CONFIG=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/.dart_tool/package_config.json"
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class InAppBrowserManager: NSObject, FlutterPlugin {
|
||||||
let contextMenu = arguments["contextMenu"] as! [String: Any]
|
let contextMenu = arguments["contextMenu"] as! [String: Any]
|
||||||
let windowId = arguments["windowId"] as? Int64
|
let windowId = arguments["windowId"] as? Int64
|
||||||
let initialUserScripts = arguments["initialUserScripts"] as? [[String: Any]]
|
let initialUserScripts = arguments["initialUserScripts"] as? [[String: Any]]
|
||||||
let pullToRefreshInitialOptions = arguments["pullToRefreshOptions"] as! [String: Any?]
|
let pullToRefreshInitialSettings = arguments["pullToRefreshSettings"] as! [String: Any?]
|
||||||
|
|
||||||
let webViewController = prepareInAppBrowserWebViewController(settings: settings)
|
let webViewController = prepareInAppBrowserWebViewController(settings: settings)
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public class InAppBrowserManager: NSObject, FlutterPlugin {
|
||||||
webViewController.contextMenu = contextMenu
|
webViewController.contextMenu = contextMenu
|
||||||
webViewController.windowId = windowId
|
webViewController.windowId = windowId
|
||||||
webViewController.initialUserScripts = initialUserScripts ?? []
|
webViewController.initialUserScripts = initialUserScripts ?? []
|
||||||
webViewController.pullToRefreshInitialOptions = pullToRefreshInitialOptions
|
webViewController.pullToRefreshInitialSettings = pullToRefreshInitialSettings
|
||||||
|
|
||||||
presentViewController(webViewController: webViewController)
|
presentViewController(webViewController: webViewController)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
|
||||||
var initialBaseUrl: String?
|
var initialBaseUrl: String?
|
||||||
var previousStatusBarStyle = -1
|
var previousStatusBarStyle = -1
|
||||||
var initialUserScripts: [[String: Any]] = []
|
var initialUserScripts: [[String: Any]] = []
|
||||||
var pullToRefreshInitialOptions: [String: Any?] = [:]
|
var pullToRefreshInitialSettings: [String: Any?] = [:]
|
||||||
var methodCallDelegate: InAppWebViewMethodHandler?
|
var methodCallDelegate: InAppWebViewMethodHandler?
|
||||||
|
|
||||||
public override func loadView() {
|
public override func loadView() {
|
||||||
|
@ -47,7 +47,7 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
|
||||||
userScripts.append(UserScript.fromMap(map: intialUserScript, windowId: windowId)!)
|
userScripts.append(UserScript.fromMap(map: intialUserScript, windowId: windowId)!)
|
||||||
}
|
}
|
||||||
|
|
||||||
let preWebviewConfiguration = InAppWebView.preWKWebViewConfiguration(options: webViewSettings)
|
let preWebviewConfiguration = InAppWebView.preWKWebViewConfiguration(settings: webViewSettings)
|
||||||
if let wId = windowId, let webViewTransport = InAppWebView.windowWebViews[wId] {
|
if let wId = windowId, let webViewTransport = InAppWebView.windowWebViews[wId] {
|
||||||
webView = webViewTransport.webView
|
webView = webViewTransport.webView
|
||||||
webView.contextMenu = contextMenu
|
webView.contextMenu = contextMenu
|
||||||
|
@ -67,9 +67,9 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
|
||||||
|
|
||||||
let pullToRefreshLayoutChannel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + id,
|
let pullToRefreshLayoutChannel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + id,
|
||||||
binaryMessenger: SwiftFlutterPlugin.instance!.registrar!.messenger())
|
binaryMessenger: SwiftFlutterPlugin.instance!.registrar!.messenger())
|
||||||
let pullToRefreshOptions = PullToRefreshSettings()
|
let pullToRefreshSettings = PullToRefreshSettings()
|
||||||
let _ = pullToRefreshOptions.parse(options: pullToRefreshInitialOptions)
|
let _ = pullToRefreshSettings.parse(settings: pullToRefreshInitialSettings)
|
||||||
let pullToRefreshControl = PullToRefreshControl(channel: pullToRefreshLayoutChannel, options: pullToRefreshOptions)
|
let pullToRefreshControl = PullToRefreshControl(channel: pullToRefreshLayoutChannel, settings: pullToRefreshSettings)
|
||||||
webView.pullToRefreshControl = pullToRefreshControl
|
webView.pullToRefreshControl = pullToRefreshControl
|
||||||
pullToRefreshControl.delegate = webView
|
pullToRefreshControl.delegate = webView
|
||||||
pullToRefreshControl.prepare()
|
pullToRefreshControl.prepare()
|
||||||
|
@ -429,8 +429,8 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
|
||||||
public func setSettings(newSettings: InAppBrowserSettings, newSettingsMap: [String: Any]) {
|
public func setSettings(newSettings: InAppBrowserSettings, newSettingsMap: [String: Any]) {
|
||||||
|
|
||||||
let newInAppWebViewOptions = InAppWebViewSettings()
|
let newInAppWebViewOptions = InAppWebViewSettings()
|
||||||
let _ = newInAppWebViewOptions.parse(options: newSettingsMap)
|
let _ = newInAppWebViewOptions.parse(settings: newSettingsMap)
|
||||||
self.webView.setOptions(newSettings: newInAppWebViewOptions, newOptionsMap: newSettingsMap)
|
self.webView.setSettings(newSettings: newInAppWebViewOptions, newSettingsMap: newSettingsMap)
|
||||||
|
|
||||||
if newSettingsMap["hidden"] != nil, browserSettings?.hidden != newSettings.hidden {
|
if newSettingsMap["hidden"] != nil, browserSettings?.hidden != newSettings.hidden {
|
||||||
if newSettings.hidden {
|
if newSettings.hidden {
|
||||||
|
@ -474,7 +474,7 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega
|
||||||
}
|
}
|
||||||
|
|
||||||
if newSettingsMap["hideToolbarBottom"] != nil, browserSettings?.hideToolbarBottom != newSettings.hideToolbarBottom {
|
if newSettingsMap["hideToolbarBottom"] != nil, browserSettings?.hideToolbarBottom != newSettings.hideToolbarBottom {
|
||||||
navigationController?.isToolbarHidden = !newOptions.hideToolbarBottom
|
navigationController?.isToolbarHidden = !newSettings.hideToolbarBottom
|
||||||
}
|
}
|
||||||
|
|
||||||
if newSettingsMap["toolbarBottomBackgroundColor"] != nil, browserSettings?.toolbarBottomBackgroundColor != newSettings.toolbarBottomBackgroundColor {
|
if newSettingsMap["toolbarBottomBackgroundColor"] != nil, browserSettings?.toolbarBottomBackgroundColor != newSettings.toolbarBottomBackgroundColor {
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView {
|
||||||
let contextMenu = params["contextMenu"] as? [String: Any]
|
let contextMenu = params["contextMenu"] as? [String: Any]
|
||||||
let windowId = params["windowId"] as? Int64
|
let windowId = params["windowId"] as? Int64
|
||||||
let initialUserScripts = params["initialUserScripts"] as? [[String: Any]]
|
let initialUserScripts = params["initialUserScripts"] as? [[String: Any]]
|
||||||
let pullToRefreshInitialOptions = params["pullToRefreshOptions"] as! [String: Any?]
|
let pullToRefreshInitialSettings = params["pullToRefreshSettings"] as! [String: Any?]
|
||||||
|
|
||||||
var userScripts: [UserScript] = []
|
var userScripts: [UserScript] = []
|
||||||
if let initialUserScripts = initialUserScripts {
|
if let initialUserScripts = initialUserScripts {
|
||||||
|
@ -44,7 +44,7 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView {
|
||||||
|
|
||||||
let settings = InAppWebViewSettings()
|
let settings = InAppWebViewSettings()
|
||||||
let _ = settings.parse(settings: initialSettings)
|
let _ = settings.parse(settings: initialSettings)
|
||||||
let preWebviewConfiguration = InAppWebView.preWKWebViewConfiguration(options: settings)
|
let preWebviewConfiguration = InAppWebView.preWKWebViewConfiguration(settings: settings)
|
||||||
|
|
||||||
if let wId = windowId, let webViewTransport = InAppWebView.windowWebViews[wId] {
|
if let wId = windowId, let webViewTransport = InAppWebView.windowWebViews[wId] {
|
||||||
webView = webViewTransport.webView
|
webView = webViewTransport.webView
|
||||||
|
@ -65,9 +65,9 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView {
|
||||||
|
|
||||||
let pullToRefreshLayoutChannel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + String(describing: viewId),
|
let pullToRefreshLayoutChannel = FlutterMethodChannel(name: "com.pichillilorenzo/flutter_inappwebview_pull_to_refresh_" + String(describing: viewId),
|
||||||
binaryMessenger: registrar.messenger())
|
binaryMessenger: registrar.messenger())
|
||||||
let pullToRefreshOptions = PullToRefreshSettings()
|
let pullToRefreshSettings = PullToRefreshSettings()
|
||||||
let _ = pullToRefreshOptions.parse(settings: pullToRefreshInitialOptions)
|
let _ = pullToRefreshSettings.parse(settings: pullToRefreshInitialSettings)
|
||||||
let pullToRefreshControl = PullToRefreshControl(channel: pullToRefreshLayoutChannel, options: pullToRefreshOptions)
|
let pullToRefreshControl = PullToRefreshControl(channel: pullToRefreshLayoutChannel, settings: pullToRefreshSettings)
|
||||||
webView!.pullToRefreshControl = pullToRefreshControl
|
webView!.pullToRefreshControl = pullToRefreshControl
|
||||||
pullToRefreshControl.delegate = webView!
|
pullToRefreshControl.delegate = webView!
|
||||||
pullToRefreshControl.prepare()
|
pullToRefreshControl.prepare()
|
||||||
|
|
|
@ -11,14 +11,14 @@ import Flutter
|
||||||
public class PullToRefreshControl : UIRefreshControl, FlutterPlugin {
|
public class PullToRefreshControl : UIRefreshControl, FlutterPlugin {
|
||||||
|
|
||||||
var channel: FlutterMethodChannel?
|
var channel: FlutterMethodChannel?
|
||||||
var options: PullToRefreshSettings?
|
var settings: PullToRefreshSettings?
|
||||||
var shouldCallOnRefresh = false
|
var shouldCallOnRefresh = false
|
||||||
var delegate: PullToRefreshDelegate?
|
var delegate: PullToRefreshDelegate?
|
||||||
|
|
||||||
public init(channel: FlutterMethodChannel?, options: PullToRefreshSettings?) {
|
public init(channel: FlutterMethodChannel?, settings: PullToRefreshSettings?) {
|
||||||
super.init()
|
super.init()
|
||||||
self.channel = channel
|
self.channel = channel
|
||||||
self.options = options
|
self.settings = settings
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
|
@ -31,7 +31,7 @@ public class PullToRefreshControl : UIRefreshControl, FlutterPlugin {
|
||||||
|
|
||||||
public func prepare() {
|
public func prepare() {
|
||||||
self.channel?.setMethodCallHandler(self.handle)
|
self.channel?.setMethodCallHandler(self.handle)
|
||||||
if let options = options {
|
if let options = settings {
|
||||||
if options.enabled {
|
if options.enabled {
|
||||||
delegate?.enablePullToRefresh()
|
delegate?.enablePullToRefresh()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// PullToRefreshOptions.swift
|
// pullToRefreshSettings.swift
|
||||||
// flutter_inappwebview
|
// flutter_inappwebview
|
||||||
//
|
//
|
||||||
// Created by Lorenzo Pichilli on 03/03/21.
|
// Created by Lorenzo Pichilli on 03/03/21.
|
||||||
|
|
|
@ -28,10 +28,8 @@ class ServiceWorkerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<dynamic> _handleMethod(MethodCall call) async {
|
static Future<dynamic> _handleMethod(MethodCall call) async {
|
||||||
ServiceWorkerController controller =
|
ServiceWorkerController controller = ServiceWorkerController.instance();
|
||||||
ServiceWorkerController.instance();
|
ServiceWorkerClient? serviceWorkerClient = controller.serviceWorkerClient;
|
||||||
ServiceWorkerClient? serviceWorkerClient =
|
|
||||||
controller.serviceWorkerClient;
|
|
||||||
|
|
||||||
switch (call.method) {
|
switch (call.method) {
|
||||||
case "shouldInterceptRequest":
|
case "shouldInterceptRequest":
|
||||||
|
|
|
@ -98,8 +98,7 @@ class WebViewFeature {
|
||||||
const WebViewFeature._internal("GET_WEB_VIEW_RENDERER");
|
const WebViewFeature._internal("GET_WEB_VIEW_RENDERER");
|
||||||
|
|
||||||
///
|
///
|
||||||
static const MULTI_PROCESS =
|
static const MULTI_PROCESS = const WebViewFeature._internal("MULTI_PROCESS");
|
||||||
const WebViewFeature._internal("MULTI_PROCESS");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const OFF_SCREEN_PRERASTER =
|
static const OFF_SCREEN_PRERASTER =
|
||||||
|
@ -139,8 +138,7 @@ class WebViewFeature {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY =
|
static const SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY =
|
||||||
const WebViewFeature._internal(
|
const WebViewFeature._internal("SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY");
|
||||||
"SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SAFE_BROWSING_RESPONSE_PROCEED =
|
static const SAFE_BROWSING_RESPONSE_PROCEED =
|
||||||
|
@ -162,8 +160,7 @@ class WebViewFeature {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SERVICE_WORKER_BLOCK_NETWORK_LOADS =
|
static const SERVICE_WORKER_BLOCK_NETWORK_LOADS =
|
||||||
const WebViewFeature._internal(
|
const WebViewFeature._internal("SERVICE_WORKER_BLOCK_NETWORK_LOADS");
|
||||||
"SERVICE_WORKER_BLOCK_NETWORK_LOADS");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SERVICE_WORKER_CACHE_MODE =
|
static const SERVICE_WORKER_CACHE_MODE =
|
||||||
|
@ -179,8 +176,7 @@ class WebViewFeature {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST =
|
static const SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST =
|
||||||
const WebViewFeature._internal(
|
const WebViewFeature._internal("SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST");
|
||||||
"SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const SHOULD_OVERRIDE_WITH_REDIRECTS =
|
static const SHOULD_OVERRIDE_WITH_REDIRECTS =
|
||||||
|
@ -216,8 +212,7 @@ class WebViewFeature {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK =
|
static const WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK =
|
||||||
const WebViewFeature._internal(
|
const WebViewFeature._internal("WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK");
|
||||||
"WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_RESOURCE_ERROR_GET_CODE =
|
static const WEB_RESOURCE_ERROR_GET_CODE =
|
||||||
|
@ -225,8 +220,7 @@ class WebViewFeature {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_RESOURCE_ERROR_GET_DESCRIPTION =
|
static const WEB_RESOURCE_ERROR_GET_DESCRIPTION =
|
||||||
const WebViewFeature._internal(
|
const WebViewFeature._internal("WEB_RESOURCE_ERROR_GET_DESCRIPTION");
|
||||||
"WEB_RESOURCE_ERROR_GET_DESCRIPTION");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_RESOURCE_REQUEST_IS_REDIRECT =
|
static const WEB_RESOURCE_REQUEST_IS_REDIRECT =
|
||||||
|
@ -234,8 +228,7 @@ class WebViewFeature {
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE =
|
static const WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE =
|
||||||
const WebViewFeature._internal(
|
const WebViewFeature._internal("WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE");
|
||||||
"WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE");
|
|
||||||
|
|
||||||
///
|
///
|
||||||
static const WEB_VIEW_RENDERER_TERMINATE =
|
static const WEB_VIEW_RENDERER_TERMINATE =
|
||||||
|
@ -258,7 +251,6 @@ class WebViewFeature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
///Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
|
||||||
///Use [WebViewFeature] instead.
|
///Use [WebViewFeature] instead.
|
||||||
@Deprecated("Use WebViewFeature instead")
|
@Deprecated("Use WebViewFeature instead")
|
||||||
|
|
|
@ -88,8 +88,9 @@ class ChromeSafariBrowser {
|
||||||
///[settings]: Settings for the [ChromeSafariBrowser].
|
///[settings]: Settings for the [ChromeSafariBrowser].
|
||||||
Future<void> open(
|
Future<void> open(
|
||||||
{required Uri url,
|
{required Uri url,
|
||||||
|
@Deprecated('Use settings instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@Deprecated('Use settings instead') ChromeSafariBrowserClassOptions? options,
|
ChromeSafariBrowserClassOptions? options,
|
||||||
ChromeSafariBrowserSettings? settings}) async {
|
ChromeSafariBrowserSettings? settings}) async {
|
||||||
assert(url.toString().isNotEmpty);
|
assert(url.toString().isNotEmpty);
|
||||||
this.throwIsAlreadyOpened(message: 'Cannot open $url!');
|
this.throwIsAlreadyOpened(message: 'Cannot open $url!');
|
||||||
|
@ -99,7 +100,8 @@ class ChromeSafariBrowser {
|
||||||
menuItemList.add({"id": value.id, "label": value.label});
|
menuItemList.add({"id": value.id, "label": value.label});
|
||||||
});
|
});
|
||||||
|
|
||||||
var initialSettings = settings?.toMap() ?? options?.toMap() ??
|
var initialSettings = settings?.toMap() ??
|
||||||
|
options?.toMap() ??
|
||||||
ChromeSafariBrowserSettings().toMap();
|
ChromeSafariBrowserSettings().toMap();
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
|
|
|
@ -32,7 +32,6 @@ class ChromeSafariBrowserOptions {
|
||||||
|
|
||||||
///Class that represents the settings that can be used for an [ChromeSafariBrowser] window.
|
///Class that represents the settings that can be used for an [ChromeSafariBrowser] window.
|
||||||
class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
||||||
|
|
||||||
///The share state that should be applied to the custom tab. The default value is [CustomTabsShareState.SHARE_STATE_DEFAULT].
|
///The share state that should be applied to the custom tab. The default value is [CustomTabsShareState.SHARE_STATE_DEFAULT].
|
||||||
///
|
///
|
||||||
///**NOTE**: Not available in a Trusted Web Activity.
|
///**NOTE**: Not available in a Trusted Web Activity.
|
||||||
|
@ -226,8 +225,7 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
|
||||||
}
|
}
|
||||||
|
|
||||||
static ChromeSafariBrowserSettings fromMap(Map<String, dynamic> map) {
|
static ChromeSafariBrowserSettings fromMap(Map<String, dynamic> map) {
|
||||||
ChromeSafariBrowserSettings options =
|
ChromeSafariBrowserSettings options = new ChromeSafariBrowserSettings();
|
||||||
new ChromeSafariBrowserSettings();
|
|
||||||
options.shareState = map["shareState"];
|
options.shareState = map["shareState"];
|
||||||
options.showTitle = map["showTitle"];
|
options.showTitle = map["showTitle"];
|
||||||
options.toolbarBackgroundColor =
|
options.toolbarBackgroundColor =
|
||||||
|
|
|
@ -113,9 +113,16 @@ class InAppBrowser {
|
||||||
this.throwIfAlreadyOpened(message: 'Cannot open $urlRequest!');
|
this.throwIfAlreadyOpened(message: 'Cannot open $urlRequest!');
|
||||||
assert(urlRequest.url != null && urlRequest.url.toString().isNotEmpty);
|
assert(urlRequest.url != null && urlRequest.url.toString().isNotEmpty);
|
||||||
|
|
||||||
var initialSettings = settings?.toMap() ?? options?.toMap() ??
|
var initialSettings = settings?.toMap() ??
|
||||||
|
options?.toMap() ??
|
||||||
InAppBrowserClassSettings().toMap();
|
InAppBrowserClassSettings().toMap();
|
||||||
|
|
||||||
|
Map<String, dynamic> pullToRefreshSettings =
|
||||||
|
pullToRefreshController?.settings.toMap() ??
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
pullToRefreshController?.options.toMap() ??
|
||||||
|
PullToRefreshSettings(enabled: false).toMap();
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('id', () => id);
|
args.putIfAbsent('id', () => id);
|
||||||
args.putIfAbsent('urlRequest', () => urlRequest.toMap());
|
args.putIfAbsent('urlRequest', () => urlRequest.toMap());
|
||||||
|
@ -125,11 +132,7 @@ class InAppBrowser {
|
||||||
args.putIfAbsent('implementation', () => implementation.toValue());
|
args.putIfAbsent('implementation', () => implementation.toValue());
|
||||||
args.putIfAbsent('initialUserScripts',
|
args.putIfAbsent('initialUserScripts',
|
||||||
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
||||||
args.putIfAbsent(
|
args.putIfAbsent('pullToRefreshSettings', () => pullToRefreshSettings);
|
||||||
'pullToRefreshOptions',
|
|
||||||
() =>
|
|
||||||
pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap());
|
|
||||||
await _sharedChannel.invokeMethod('open', args);
|
await _sharedChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,9 +181,16 @@ class InAppBrowser {
|
||||||
this.throwIfAlreadyOpened(message: 'Cannot open $assetFilePath!');
|
this.throwIfAlreadyOpened(message: 'Cannot open $assetFilePath!');
|
||||||
assert(assetFilePath.isNotEmpty);
|
assert(assetFilePath.isNotEmpty);
|
||||||
|
|
||||||
var initialSettings = settings?.toMap() ?? options?.toMap() ??
|
var initialSettings = settings?.toMap() ??
|
||||||
|
options?.toMap() ??
|
||||||
InAppBrowserClassSettings().toMap();
|
InAppBrowserClassSettings().toMap();
|
||||||
|
|
||||||
|
Map<String, dynamic> pullToRefreshSettings =
|
||||||
|
pullToRefreshController?.settings.toMap() ??
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
pullToRefreshController?.options.toMap() ??
|
||||||
|
PullToRefreshSettings(enabled: false).toMap();
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('id', () => id);
|
args.putIfAbsent('id', () => id);
|
||||||
args.putIfAbsent('assetFilePath', () => assetFilePath);
|
args.putIfAbsent('assetFilePath', () => assetFilePath);
|
||||||
|
@ -190,11 +200,7 @@ class InAppBrowser {
|
||||||
args.putIfAbsent('implementation', () => implementation.toValue());
|
args.putIfAbsent('implementation', () => implementation.toValue());
|
||||||
args.putIfAbsent('initialUserScripts',
|
args.putIfAbsent('initialUserScripts',
|
||||||
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
||||||
args.putIfAbsent(
|
args.putIfAbsent('pullToRefreshSettings', () => pullToRefreshSettings);
|
||||||
'pullToRefreshOptions',
|
|
||||||
() =>
|
|
||||||
pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap());
|
|
||||||
await _sharedChannel.invokeMethod('open', args);
|
await _sharedChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,9 +227,16 @@ class InAppBrowser {
|
||||||
InAppBrowserClassSettings? settings}) async {
|
InAppBrowserClassSettings? settings}) async {
|
||||||
this.throwIfAlreadyOpened(message: 'Cannot open data!');
|
this.throwIfAlreadyOpened(message: 'Cannot open data!');
|
||||||
|
|
||||||
var initialSettings = settings?.toMap() ?? options?.toMap() ??
|
var initialSettings = settings?.toMap() ??
|
||||||
|
options?.toMap() ??
|
||||||
InAppBrowserClassSettings().toMap();
|
InAppBrowserClassSettings().toMap();
|
||||||
|
|
||||||
|
Map<String, dynamic> pullToRefreshSettings =
|
||||||
|
pullToRefreshController?.settings.toMap() ??
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
pullToRefreshController?.options.toMap() ??
|
||||||
|
PullToRefreshSettings(enabled: false).toMap();
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('id', () => id);
|
args.putIfAbsent('id', () => id);
|
||||||
args.putIfAbsent('settings', () => initialSettings);
|
args.putIfAbsent('settings', () => initialSettings);
|
||||||
|
@ -231,18 +244,14 @@ class InAppBrowser {
|
||||||
args.putIfAbsent('mimeType', () => mimeType);
|
args.putIfAbsent('mimeType', () => mimeType);
|
||||||
args.putIfAbsent('encoding', () => encoding);
|
args.putIfAbsent('encoding', () => encoding);
|
||||||
args.putIfAbsent('baseUrl', () => baseUrl?.toString() ?? "about:blank");
|
args.putIfAbsent('baseUrl', () => baseUrl?.toString() ?? "about:blank");
|
||||||
args.putIfAbsent(
|
args.putIfAbsent('historyUrl',
|
||||||
'historyUrl', () => (historyUrl ?? androidHistoryUrl)?.toString() ?? "about:blank");
|
() => (historyUrl ?? androidHistoryUrl)?.toString() ?? "about:blank");
|
||||||
args.putIfAbsent('contextMenu', () => contextMenu?.toMap() ?? {});
|
args.putIfAbsent('contextMenu', () => contextMenu?.toMap() ?? {});
|
||||||
args.putIfAbsent('windowId', () => windowId);
|
args.putIfAbsent('windowId', () => windowId);
|
||||||
args.putIfAbsent('implementation', () => implementation.toValue());
|
args.putIfAbsent('implementation', () => implementation.toValue());
|
||||||
args.putIfAbsent('initialUserScripts',
|
args.putIfAbsent('initialUserScripts',
|
||||||
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
() => initialUserScripts?.map((e) => e.toMap()).toList() ?? []);
|
||||||
args.putIfAbsent(
|
args.putIfAbsent('pullToRefreshSettings', () => pullToRefreshSettings);
|
||||||
'pullToRefreshOptions',
|
|
||||||
() =>
|
|
||||||
pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap());
|
|
||||||
await _sharedChannel.invokeMethod('open', args);
|
await _sharedChannel.invokeMethod('open', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +318,8 @@ class InAppBrowser {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Sets the [InAppBrowser] settings with the new [settings] and evaluates them.
|
///Sets the [InAppBrowser] settings with the new [settings] and evaluates them.
|
||||||
Future<void> setSettings({required InAppBrowserClassSettings settings}) async {
|
Future<void> setSettings(
|
||||||
|
{required InAppBrowserClassSettings settings}) async {
|
||||||
this.throwIfNotOpened();
|
this.throwIfNotOpened();
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
|
@ -326,7 +336,8 @@ class InAppBrowser {
|
||||||
await _channel.invokeMethod('getSettings', args);
|
await _channel.invokeMethod('getSettings', args);
|
||||||
if (settings != null) {
|
if (settings != null) {
|
||||||
settings = settings.cast<String, dynamic>();
|
settings = settings.cast<String, dynamic>();
|
||||||
return InAppBrowserClassSettings.fromMap(settings as Map<String, dynamic>);
|
return InAppBrowserClassSettings.fromMap(
|
||||||
|
settings as Map<String, dynamic>);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -863,8 +874,7 @@ class InAppBrowser {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
Future<WebViewRenderProcessAction?>? onRenderProcessUnresponsive(
|
Future<WebViewRenderProcessAction?>? onRenderProcessUnresponsive(Uri? url) {}
|
||||||
Uri? url) {}
|
|
||||||
|
|
||||||
///Use [onRenderProcessResponsive] instead.
|
///Use [onRenderProcessResponsive] instead.
|
||||||
@Deprecated("Use onRenderProcessResponsive instead")
|
@Deprecated("Use onRenderProcessResponsive instead")
|
||||||
|
@ -883,8 +893,7 @@ class InAppBrowser {
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
Future<WebViewRenderProcessAction?>? onRenderProcessResponsive(
|
Future<WebViewRenderProcessAction?>? onRenderProcessResponsive(Uri? url) {}
|
||||||
Uri? url) {}
|
|
||||||
|
|
||||||
///Use [onRenderProcessGone] instead.
|
///Use [onRenderProcessGone] instead.
|
||||||
@Deprecated("Use onRenderProcessGone instead")
|
@Deprecated("Use onRenderProcessGone instead")
|
||||||
|
@ -928,7 +937,6 @@ class InAppBrowser {
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)))
|
||||||
void onReceivedIcon(Uint8List icon) {}
|
void onReceivedIcon(Uint8List icon) {}
|
||||||
|
|
||||||
|
|
||||||
///Use [onReceivedTouchIconUrl] instead.
|
///Use [onReceivedTouchIconUrl] instead.
|
||||||
@Deprecated('Use onReceivedTouchIconUrl instead')
|
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||||
void androidOnReceivedTouchIconUrl(Uri url, bool precomposed) {}
|
void androidOnReceivedTouchIconUrl(Uri url, bool precomposed) {}
|
||||||
|
@ -943,7 +951,6 @@ class InAppBrowser {
|
||||||
///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)))
|
||||||
void onReceivedTouchIconUrl(Uri url, bool precomposed) {}
|
void onReceivedTouchIconUrl(Uri url, bool precomposed) {}
|
||||||
|
|
||||||
|
|
||||||
///Use [onJsBeforeUnload] instead.
|
///Use [onJsBeforeUnload] instead.
|
||||||
@Deprecated('Use onJsBeforeUnload instead')
|
@Deprecated('Use onJsBeforeUnload instead')
|
||||||
Future<JsBeforeUnloadResponse?>? androidOnJsBeforeUnload(
|
Future<JsBeforeUnloadResponse?>? androidOnJsBeforeUnload(
|
||||||
|
|
|
@ -60,7 +60,8 @@ class InAppBrowserClassSettings {
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Map<String, dynamic> instanceToMap(InAppBrowserClassSettings settings) {
|
static Map<String, dynamic> instanceToMap(
|
||||||
|
InAppBrowserClassSettings settings) {
|
||||||
return settings.toMap();
|
return settings.toMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +74,8 @@ class InAppBrowserClassSettings {
|
||||||
return toMap().toString();
|
return toMap().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
static InAppBrowserClassSettings fromMap(Map<String, dynamic> options, {InAppBrowserClassSettings? instance}) {
|
static InAppBrowserClassSettings fromMap(Map<String, dynamic> options,
|
||||||
|
{InAppBrowserClassSettings? instance}) {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = InAppBrowserClassSettings();
|
instance = InAppBrowserClassSettings();
|
||||||
}
|
}
|
||||||
|
@ -88,8 +90,8 @@ class InAppBrowserClassSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
///This class represents all [InAppBrowser] settings available.
|
///This class represents all [InAppBrowser] settings available.
|
||||||
class InAppBrowserSettings implements BrowserOptions, AndroidOptions, IosOptions {
|
class InAppBrowserSettings
|
||||||
|
implements BrowserOptions, AndroidOptions, IosOptions {
|
||||||
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
///Set to `true` to create the browser and load the page, but not show it. Omit or set to `false` to have the browser open and load normally.
|
||||||
///The default value is `false`.
|
///The default value is `false`.
|
||||||
///
|
///
|
||||||
|
@ -282,9 +284,11 @@ class InAppBrowserSettings implements BrowserOptions, AndroidOptions, IosOptions
|
||||||
instance.toolbarTopFixedTitle = map["toolbarTopFixedTitle"];
|
instance.toolbarTopFixedTitle = map["toolbarTopFixedTitle"];
|
||||||
instance.closeOnCannotGoBack = map["closeOnCannotGoBack"];
|
instance.closeOnCannotGoBack = map["closeOnCannotGoBack"];
|
||||||
instance.allowGoBackWithBackButton = map["allowGoBackWithBackButton"];
|
instance.allowGoBackWithBackButton = map["allowGoBackWithBackButton"];
|
||||||
instance.shouldCloseOnBackButtonPressed = map["shouldCloseOnBackButtonPressed"];
|
instance.shouldCloseOnBackButtonPressed =
|
||||||
|
map["shouldCloseOnBackButtonPressed"];
|
||||||
instance.toolbarTopTranslucent = map["toolbarTopTranslucent"];
|
instance.toolbarTopTranslucent = map["toolbarTopTranslucent"];
|
||||||
instance.toolbarTopTintColor = UtilColor.fromHex(map["toolbarTopTintColor"]);
|
instance.toolbarTopTintColor =
|
||||||
|
UtilColor.fromHex(map["toolbarTopTintColor"]);
|
||||||
instance.hideToolbarBottom = map["hideToolbarBottom"];
|
instance.hideToolbarBottom = map["hideToolbarBottom"];
|
||||||
instance.toolbarBottomBackgroundColor =
|
instance.toolbarBottomBackgroundColor =
|
||||||
UtilColor.fromHex(map["toolbarBottomBackgroundColor"]);
|
UtilColor.fromHex(map["toolbarBottomBackgroundColor"]);
|
||||||
|
|
|
@ -76,7 +76,8 @@ class IOSInAppBrowserOptions implements BrowserOptions, IosOptions {
|
||||||
static IOSInAppBrowserOptions fromMap(Map<String, dynamic> map) {
|
static IOSInAppBrowserOptions fromMap(Map<String, dynamic> map) {
|
||||||
var instance = IOSInAppBrowserOptions();
|
var instance = IOSInAppBrowserOptions();
|
||||||
instance.toolbarTopTranslucent = map["toolbarTopTranslucent"];
|
instance.toolbarTopTranslucent = map["toolbarTopTranslucent"];
|
||||||
instance.toolbarTopTintColor = UtilColor.fromHex(map["toolbarTopTintColor"]);
|
instance.toolbarTopTintColor =
|
||||||
|
UtilColor.fromHex(map["toolbarTopTintColor"]);
|
||||||
instance.hideToolbarBottom = map["hideToolbarBottom"];
|
instance.hideToolbarBottom = map["hideToolbarBottom"];
|
||||||
instance.toolbarBottomBackgroundColor =
|
instance.toolbarBottomBackgroundColor =
|
||||||
UtilColor.fromHex(map["toolbarBottomBackgroundColor"]);
|
UtilColor.fromHex(map["toolbarBottomBackgroundColor"]);
|
||||||
|
|
|
@ -127,7 +127,8 @@ class AndroidInAppWebViewController with AndroidInAppWebViewControllerMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl] instead.
|
///Use [InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl] instead.
|
||||||
@Deprecated("Use InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl instead")
|
@Deprecated(
|
||||||
|
"Use InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl instead")
|
||||||
static Future<Uri?> getSafeBrowsingPrivacyPolicyUrl() async {
|
static Future<Uri?> getSafeBrowsingPrivacyPolicyUrl() async {
|
||||||
return await InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl();
|
return await InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl();
|
||||||
}
|
}
|
||||||
|
@ -142,15 +143,18 @@ class AndroidInAppWebViewController with AndroidInAppWebViewControllerMixin {
|
||||||
///Use [InAppWebViewController.getCurrentWebViewPackage] instead.
|
///Use [InAppWebViewController.getCurrentWebViewPackage] instead.
|
||||||
@Deprecated("Use InAppWebViewController.getCurrentWebViewPackage instead")
|
@Deprecated("Use InAppWebViewController.getCurrentWebViewPackage instead")
|
||||||
static Future<AndroidWebViewPackageInfo?> getCurrentWebViewPackage() async {
|
static Future<AndroidWebViewPackageInfo?> getCurrentWebViewPackage() async {
|
||||||
Map<String, dynamic>? packageInfo = (await InAppWebViewController.getCurrentWebViewPackage())?.toMap();
|
Map<String, dynamic>? packageInfo =
|
||||||
|
(await InAppWebViewController.getCurrentWebViewPackage())?.toMap();
|
||||||
return AndroidWebViewPackageInfo.fromMap(packageInfo);
|
return AndroidWebViewPackageInfo.fromMap(packageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [InAppWebViewController.setWebContentsDebuggingEnabled] instead.
|
///Use [InAppWebViewController.setWebContentsDebuggingEnabled] instead.
|
||||||
@Deprecated("Use InAppWebViewController.setWebContentsDebuggingEnabled instead")
|
@Deprecated(
|
||||||
|
"Use InAppWebViewController.setWebContentsDebuggingEnabled instead")
|
||||||
static Future<void> setWebContentsDebuggingEnabled(
|
static Future<void> setWebContentsDebuggingEnabled(
|
||||||
bool debuggingEnabled) async {
|
bool debuggingEnabled) async {
|
||||||
return await InAppWebViewController.setWebContentsDebuggingEnabled(debuggingEnabled);
|
return await InAppWebViewController.setWebContentsDebuggingEnabled(
|
||||||
|
debuggingEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
///Use [InAppWebViewController.getOriginalUrl] instead.
|
///Use [InAppWebViewController.getOriginalUrl] instead.
|
||||||
|
|
|
@ -11,7 +11,7 @@ import 'webview.dart';
|
||||||
import 'in_app_webview_controller.dart';
|
import 'in_app_webview_controller.dart';
|
||||||
import 'in_app_webview_settings.dart';
|
import 'in_app_webview_settings.dart';
|
||||||
import '../pull_to_refresh/pull_to_refresh_controller.dart';
|
import '../pull_to_refresh/pull_to_refresh_controller.dart';
|
||||||
import '../pull_to_refresh/pull_to_refresh_options.dart';
|
import '../pull_to_refresh/pull_to_refresh_settings.dart';
|
||||||
import '../util.dart';
|
import '../util.dart';
|
||||||
|
|
||||||
///Class that represents a WebView in headless mode.
|
///Class that represents a WebView in headless mode.
|
||||||
|
@ -43,8 +43,8 @@ class HeadlessInAppWebView implements WebView {
|
||||||
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
///**NOTE for Android**: `Size` width and height values will be converted to `int` values because they cannot have `double` values.
|
||||||
final Size initialSize;
|
final Size initialSize;
|
||||||
|
|
||||||
HeadlessInAppWebView(
|
HeadlessInAppWebView({
|
||||||
{this.initialSize = const Size(-1, -1),
|
this.initialSize = const Size(-1, -1),
|
||||||
this.windowId,
|
this.windowId,
|
||||||
this.initialUrlRequest,
|
this.initialUrlRequest,
|
||||||
this.initialFile,
|
this.initialFile,
|
||||||
|
@ -65,8 +65,7 @@ class HeadlessInAppWebView implements WebView {
|
||||||
this.shouldOverrideUrlLoading,
|
this.shouldOverrideUrlLoading,
|
||||||
this.onLoadResource,
|
this.onLoadResource,
|
||||||
this.onScrollChanged,
|
this.onScrollChanged,
|
||||||
@Deprecated('Use onDownloadStartRequest instead')
|
@Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart,
|
||||||
this.onDownloadStart,
|
|
||||||
this.onDownloadStartRequest,
|
this.onDownloadStartRequest,
|
||||||
this.onLoadResourceCustomScheme,
|
this.onLoadResourceCustomScheme,
|
||||||
this.onCreateWindow,
|
this.onCreateWindow,
|
||||||
|
@ -94,39 +93,54 @@ class HeadlessInAppWebView implements WebView {
|
||||||
this.onOverScrolled,
|
this.onOverScrolled,
|
||||||
@Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit,
|
@Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit,
|
||||||
this.onSafeBrowsingHit,
|
this.onSafeBrowsingHit,
|
||||||
@Deprecated('Use onPermissionRequest instead') this.androidOnPermissionRequest,
|
@Deprecated('Use onPermissionRequest instead')
|
||||||
|
this.androidOnPermissionRequest,
|
||||||
this.onPermissionRequest,
|
this.onPermissionRequest,
|
||||||
@Deprecated('Use onGeolocationPermissionsShowPrompt instead') this.androidOnGeolocationPermissionsShowPrompt,
|
@Deprecated('Use onGeolocationPermissionsShowPrompt instead')
|
||||||
|
this.androidOnGeolocationPermissionsShowPrompt,
|
||||||
this.onGeolocationPermissionsShowPrompt,
|
this.onGeolocationPermissionsShowPrompt,
|
||||||
@Deprecated('Use onGeolocationPermissionsHidePrompt instead') this.androidOnGeolocationPermissionsHidePrompt,
|
@Deprecated('Use onGeolocationPermissionsHidePrompt instead')
|
||||||
|
this.androidOnGeolocationPermissionsHidePrompt,
|
||||||
this.onGeolocationPermissionsHidePrompt,
|
this.onGeolocationPermissionsHidePrompt,
|
||||||
@Deprecated('Use shouldInterceptRequest instead') this.androidShouldInterceptRequest,
|
@Deprecated('Use shouldInterceptRequest instead')
|
||||||
|
this.androidShouldInterceptRequest,
|
||||||
this.shouldInterceptRequest,
|
this.shouldInterceptRequest,
|
||||||
@Deprecated('Use onRenderProcessGone instead') this.androidOnRenderProcessGone,
|
@Deprecated('Use onRenderProcessGone instead')
|
||||||
|
this.androidOnRenderProcessGone,
|
||||||
this.onRenderProcessGone,
|
this.onRenderProcessGone,
|
||||||
@Deprecated('Use onRenderProcessResponsive instead') this.androidOnRenderProcessResponsive,
|
@Deprecated('Use onRenderProcessResponsive instead')
|
||||||
|
this.androidOnRenderProcessResponsive,
|
||||||
this.onRenderProcessResponsive,
|
this.onRenderProcessResponsive,
|
||||||
@Deprecated('Use onRenderProcessUnresponsive instead') this.androidOnRenderProcessUnresponsive,
|
@Deprecated('Use onRenderProcessUnresponsive instead')
|
||||||
|
this.androidOnRenderProcessUnresponsive,
|
||||||
this.onRenderProcessUnresponsive,
|
this.onRenderProcessUnresponsive,
|
||||||
@Deprecated('Use onFormResubmission instead') this.androidOnFormResubmission,
|
@Deprecated('Use onFormResubmission instead')
|
||||||
|
this.androidOnFormResubmission,
|
||||||
this.onFormResubmission,
|
this.onFormResubmission,
|
||||||
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||||
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||||
this.onReceivedIcon,
|
this.onReceivedIcon,
|
||||||
@Deprecated('Use onReceivedTouchIconUrl instead') this.androidOnReceivedTouchIconUrl,
|
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||||
|
this.androidOnReceivedTouchIconUrl,
|
||||||
this.onReceivedTouchIconUrl,
|
this.onReceivedTouchIconUrl,
|
||||||
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||||
this.onJsBeforeUnload,
|
this.onJsBeforeUnload,
|
||||||
@Deprecated('Use onReceivedLoginRequest instead') this.androidOnReceivedLoginRequest,
|
@Deprecated('Use onReceivedLoginRequest instead')
|
||||||
|
this.androidOnReceivedLoginRequest,
|
||||||
this.onReceivedLoginRequest,
|
this.onReceivedLoginRequest,
|
||||||
@Deprecated('Use onWebContentProcessDidTerminate instead') this.iosOnWebContentProcessDidTerminate,
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
|
this.iosOnWebContentProcessDidTerminate,
|
||||||
this.onWebContentProcessDidTerminate,
|
this.onWebContentProcessDidTerminate,
|
||||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||||
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
@Deprecated('Use onNavigationResponse instead') this.iosOnNavigationResponse,
|
@Deprecated('Use onNavigationResponse instead')
|
||||||
|
this.iosOnNavigationResponse,
|
||||||
this.onNavigationResponse,
|
this.onNavigationResponse,
|
||||||
@Deprecated('Use shouldAllowDeprecatedTLS instead') this.iosShouldAllowDeprecatedTLS,
|
@Deprecated('Use shouldAllowDeprecatedTLS instead')
|
||||||
this.shouldAllowDeprecatedTLS,}) {
|
this.iosShouldAllowDeprecatedTLS,
|
||||||
|
this.shouldAllowDeprecatedTLS,
|
||||||
|
}) {
|
||||||
id = IdGenerator.generate();
|
id = IdGenerator.generate();
|
||||||
webViewController = new InAppWebViewController(id, this);
|
webViewController = new InAppWebViewController(id, this);
|
||||||
this._channel =
|
this._channel =
|
||||||
|
@ -155,10 +169,16 @@ class HeadlessInAppWebView implements WebView {
|
||||||
}
|
}
|
||||||
_started = true;
|
_started = true;
|
||||||
|
|
||||||
Map<String, dynamic> initialSettings = (this.initialSettings != null ?
|
Map<String, dynamic> initialSettings = this.initialSettings?.toMap() ??
|
||||||
this.initialSettings?.toMap() :
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.initialOptions?.toMap()) ?? {};
|
this.initialOptions?.toMap() ??
|
||||||
|
{};
|
||||||
|
|
||||||
|
Map<String, dynamic> pullToRefreshSettings =
|
||||||
|
this.pullToRefreshController?.settings.toMap() ??
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
this.pullToRefreshController?.options.toMap() ??
|
||||||
|
PullToRefreshSettings(enabled: false).toMap();
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('id', () => id);
|
args.putIfAbsent('id', () => id);
|
||||||
|
@ -174,9 +194,7 @@ class HeadlessInAppWebView implements WebView {
|
||||||
'implementation': this.implementation.toValue(),
|
'implementation': this.implementation.toValue(),
|
||||||
'initialUserScripts':
|
'initialUserScripts':
|
||||||
this.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
this.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
||||||
'pullToRefreshOptions':
|
'pullToRefreshSettings': pullToRefreshSettings,
|
||||||
this.pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap(),
|
|
||||||
'initialSize': this.initialSize.toMap()
|
'initialSize': this.initialSize.toMap()
|
||||||
});
|
});
|
||||||
await _sharedChannel.invokeMethod('run', args);
|
await _sharedChannel.invokeMethod('run', args);
|
||||||
|
@ -425,8 +443,7 @@ class HeadlessInAppWebView implements WebView {
|
||||||
onScrollChanged;
|
onScrollChanged;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(
|
void Function(InAppWebViewController controller, Uri? url, bool? isReload)?
|
||||||
InAppWebViewController controller, Uri? url, bool? isReload)?
|
|
||||||
onUpdateVisitedHistory;
|
onUpdateVisitedHistory;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -528,53 +545,74 @@ class HeadlessInAppWebView implements WebView {
|
||||||
androidOnReceivedLoginRequest;
|
androidOnReceivedLoginRequest;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller)? onDidReceiveServerRedirectForProvisionalNavigation;
|
void Function(InAppWebViewController controller)?
|
||||||
|
onDidReceiveServerRedirectForProvisionalNavigation;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<FormResubmissionAction?> Function(InAppWebViewController controller, Uri? url)? onFormResubmission;
|
Future<FormResubmissionAction?> Function(
|
||||||
|
InAppWebViewController controller, Uri? url)? onFormResubmission;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller)? onGeolocationPermissionsHidePrompt;
|
void Function(InAppWebViewController controller)?
|
||||||
|
onGeolocationPermissionsHidePrompt;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<GeolocationPermissionShowPromptResponse?> Function(InAppWebViewController controller, String origin)? onGeolocationPermissionsShowPrompt;
|
Future<GeolocationPermissionShowPromptResponse?> Function(
|
||||||
|
InAppWebViewController controller, String origin)?
|
||||||
|
onGeolocationPermissionsShowPrompt;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<JsBeforeUnloadResponse?> Function(InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)? onJsBeforeUnload;
|
Future<JsBeforeUnloadResponse?> Function(InAppWebViewController controller,
|
||||||
|
JsBeforeUnloadRequest jsBeforeUnloadRequest)? onJsBeforeUnload;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<NavigationResponseAction?> Function(InAppWebViewController controller, NavigationResponse navigationResponse)? onNavigationResponse;
|
Future<NavigationResponseAction?> Function(InAppWebViewController controller,
|
||||||
|
NavigationResponse navigationResponse)? onNavigationResponse;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<PermissionRequestResponse?> Function(InAppWebViewController controller, String origin, List<String> resources)? onPermissionRequest;
|
Future<PermissionRequestResponse?> Function(InAppWebViewController controller,
|
||||||
|
String origin, List<String> resources)? onPermissionRequest;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller, Uint8List icon)? onReceivedIcon;
|
void Function(InAppWebViewController controller, Uint8List icon)?
|
||||||
|
onReceivedIcon;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller, LoginRequest loginRequest)? onReceivedLoginRequest;
|
void Function(InAppWebViewController controller, LoginRequest loginRequest)?
|
||||||
|
onReceivedLoginRequest;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller, Uri url, bool precomposed)? onReceivedTouchIconUrl;
|
void Function(InAppWebViewController controller, Uri url, bool precomposed)?
|
||||||
|
onReceivedTouchIconUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller, RenderProcessGoneDetail detail)? onRenderProcessGone;
|
void Function(
|
||||||
|
InAppWebViewController controller, RenderProcessGoneDetail detail)?
|
||||||
|
onRenderProcessGone;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<WebViewRenderProcessAction?> Function(InAppWebViewController controller, Uri? url)? onRenderProcessResponsive;
|
Future<WebViewRenderProcessAction?> Function(
|
||||||
|
InAppWebViewController controller, Uri? url)? onRenderProcessResponsive;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<WebViewRenderProcessAction?> Function(InAppWebViewController controller, Uri? url)? onRenderProcessUnresponsive;
|
Future<WebViewRenderProcessAction?> Function(
|
||||||
|
InAppWebViewController controller, Uri? url)? onRenderProcessUnresponsive;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<SafeBrowsingResponse?> Function(InAppWebViewController controller, Uri url, SafeBrowsingThreat? threatType)? onSafeBrowsingHit;
|
Future<SafeBrowsingResponse?> Function(InAppWebViewController controller,
|
||||||
|
Uri url, SafeBrowsingThreat? threatType)? onSafeBrowsingHit;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void Function(InAppWebViewController controller)? onWebContentProcessDidTerminate;
|
void Function(InAppWebViewController controller)?
|
||||||
|
onWebContentProcessDidTerminate;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<ShouldAllowDeprecatedTLSAction?> Function(InAppWebViewController controller, URLAuthenticationChallenge challenge)? shouldAllowDeprecatedTLS;
|
Future<ShouldAllowDeprecatedTLSAction?> Function(
|
||||||
|
InAppWebViewController controller,
|
||||||
|
URLAuthenticationChallenge challenge)? shouldAllowDeprecatedTLS;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<WebResourceResponse?> Function(InAppWebViewController controller, WebResourceRequest request)? shouldInterceptRequest;
|
Future<WebResourceResponse?> Function(
|
||||||
|
InAppWebViewController controller, WebResourceRequest request)?
|
||||||
|
shouldInterceptRequest;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,38 +82,52 @@ class InAppWebView extends StatefulWidget implements WebView {
|
||||||
this.onZoomScaleChanged,
|
this.onZoomScaleChanged,
|
||||||
@Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit,
|
@Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit,
|
||||||
this.onSafeBrowsingHit,
|
this.onSafeBrowsingHit,
|
||||||
@Deprecated('Use onPermissionRequest instead') this.androidOnPermissionRequest,
|
@Deprecated('Use onPermissionRequest instead')
|
||||||
|
this.androidOnPermissionRequest,
|
||||||
this.onPermissionRequest,
|
this.onPermissionRequest,
|
||||||
@Deprecated('Use onGeolocationPermissionsShowPrompt instead') this.androidOnGeolocationPermissionsShowPrompt,
|
@Deprecated('Use onGeolocationPermissionsShowPrompt instead')
|
||||||
|
this.androidOnGeolocationPermissionsShowPrompt,
|
||||||
this.onGeolocationPermissionsShowPrompt,
|
this.onGeolocationPermissionsShowPrompt,
|
||||||
@Deprecated('Use onGeolocationPermissionsHidePrompt instead') this.androidOnGeolocationPermissionsHidePrompt,
|
@Deprecated('Use onGeolocationPermissionsHidePrompt instead')
|
||||||
|
this.androidOnGeolocationPermissionsHidePrompt,
|
||||||
this.onGeolocationPermissionsHidePrompt,
|
this.onGeolocationPermissionsHidePrompt,
|
||||||
@Deprecated('Use shouldInterceptRequest instead') this.androidShouldInterceptRequest,
|
@Deprecated('Use shouldInterceptRequest instead')
|
||||||
|
this.androidShouldInterceptRequest,
|
||||||
this.shouldInterceptRequest,
|
this.shouldInterceptRequest,
|
||||||
@Deprecated('Use onRenderProcessGone instead') this.androidOnRenderProcessGone,
|
@Deprecated('Use onRenderProcessGone instead')
|
||||||
|
this.androidOnRenderProcessGone,
|
||||||
this.onRenderProcessGone,
|
this.onRenderProcessGone,
|
||||||
@Deprecated('Use onRenderProcessResponsive instead') this.androidOnRenderProcessResponsive,
|
@Deprecated('Use onRenderProcessResponsive instead')
|
||||||
|
this.androidOnRenderProcessResponsive,
|
||||||
this.onRenderProcessResponsive,
|
this.onRenderProcessResponsive,
|
||||||
@Deprecated('Use onRenderProcessUnresponsive instead') this.androidOnRenderProcessUnresponsive,
|
@Deprecated('Use onRenderProcessUnresponsive instead')
|
||||||
|
this.androidOnRenderProcessUnresponsive,
|
||||||
this.onRenderProcessUnresponsive,
|
this.onRenderProcessUnresponsive,
|
||||||
@Deprecated('Use onFormResubmission instead') this.androidOnFormResubmission,
|
@Deprecated('Use onFormResubmission instead')
|
||||||
|
this.androidOnFormResubmission,
|
||||||
this.onFormResubmission,
|
this.onFormResubmission,
|
||||||
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||||
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||||
this.onReceivedIcon,
|
this.onReceivedIcon,
|
||||||
@Deprecated('Use onReceivedTouchIconUrl instead') this.androidOnReceivedTouchIconUrl,
|
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||||
|
this.androidOnReceivedTouchIconUrl,
|
||||||
this.onReceivedTouchIconUrl,
|
this.onReceivedTouchIconUrl,
|
||||||
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||||
this.onJsBeforeUnload,
|
this.onJsBeforeUnload,
|
||||||
@Deprecated('Use onReceivedLoginRequest instead') this.androidOnReceivedLoginRequest,
|
@Deprecated('Use onReceivedLoginRequest instead')
|
||||||
|
this.androidOnReceivedLoginRequest,
|
||||||
this.onReceivedLoginRequest,
|
this.onReceivedLoginRequest,
|
||||||
@Deprecated('Use onWebContentProcessDidTerminate instead') this.iosOnWebContentProcessDidTerminate,
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
|
this.iosOnWebContentProcessDidTerminate,
|
||||||
this.onWebContentProcessDidTerminate,
|
this.onWebContentProcessDidTerminate,
|
||||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||||
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
@Deprecated('Use onNavigationResponse instead') this.iosOnNavigationResponse,
|
@Deprecated('Use onNavigationResponse instead')
|
||||||
|
this.iosOnNavigationResponse,
|
||||||
this.onNavigationResponse,
|
this.onNavigationResponse,
|
||||||
@Deprecated('Use shouldAllowDeprecatedTLS instead') this.iosShouldAllowDeprecatedTLS,
|
@Deprecated('Use shouldAllowDeprecatedTLS instead')
|
||||||
|
this.iosShouldAllowDeprecatedTLS,
|
||||||
this.shouldAllowDeprecatedTLS,
|
this.shouldAllowDeprecatedTLS,
|
||||||
this.gestureRecognizers,
|
this.gestureRecognizers,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
@ -428,55 +442,84 @@ class InAppWebView extends StatefulWidget implements WebView {
|
||||||
androidOnReceivedLoginRequest;
|
androidOnReceivedLoginRequest;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)? onDidReceiveServerRedirectForProvisionalNavigation;
|
final void Function(InAppWebViewController controller)?
|
||||||
|
onDidReceiveServerRedirectForProvisionalNavigation;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<FormResubmissionAction?> Function(InAppWebViewController controller, Uri? url)? onFormResubmission;
|
final Future<FormResubmissionAction?> Function(
|
||||||
|
InAppWebViewController controller, Uri? url)? onFormResubmission;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)? onGeolocationPermissionsHidePrompt;
|
final void Function(InAppWebViewController controller)?
|
||||||
|
onGeolocationPermissionsHidePrompt;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<GeolocationPermissionShowPromptResponse?> Function(InAppWebViewController controller, String origin)? onGeolocationPermissionsShowPrompt;
|
final Future<GeolocationPermissionShowPromptResponse?> Function(
|
||||||
|
InAppWebViewController controller, String origin)?
|
||||||
|
onGeolocationPermissionsShowPrompt;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsBeforeUnloadResponse?> Function(InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)? onJsBeforeUnload;
|
final Future<JsBeforeUnloadResponse?> Function(
|
||||||
|
InAppWebViewController controller,
|
||||||
|
JsBeforeUnloadRequest jsBeforeUnloadRequest)? onJsBeforeUnload;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<NavigationResponseAction?> Function(InAppWebViewController controller, NavigationResponse navigationResponse)? onNavigationResponse;
|
final Future<NavigationResponseAction?> Function(
|
||||||
|
InAppWebViewController controller,
|
||||||
|
NavigationResponse navigationResponse)? onNavigationResponse;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<PermissionRequestResponse?> Function(InAppWebViewController controller, String origin, List<String> resources)? onPermissionRequest;
|
final Future<PermissionRequestResponse?> Function(
|
||||||
|
InAppWebViewController controller,
|
||||||
|
String origin,
|
||||||
|
List<String> resources)? onPermissionRequest;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, Uint8List icon)? onReceivedIcon;
|
final void Function(InAppWebViewController controller, Uint8List icon)?
|
||||||
|
onReceivedIcon;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, LoginRequest loginRequest)? onReceivedLoginRequest;
|
final void Function(
|
||||||
|
InAppWebViewController controller, LoginRequest loginRequest)?
|
||||||
|
onReceivedLoginRequest;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, Uri url, bool precomposed)? onReceivedTouchIconUrl;
|
final void Function(
|
||||||
|
InAppWebViewController controller, Uri url, bool precomposed)?
|
||||||
|
onReceivedTouchIconUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, RenderProcessGoneDetail detail)? onRenderProcessGone;
|
final void Function(
|
||||||
|
InAppWebViewController controller, RenderProcessGoneDetail detail)?
|
||||||
|
onRenderProcessGone;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<WebViewRenderProcessAction?> Function(InAppWebViewController controller, Uri? url)? onRenderProcessResponsive;
|
final Future<WebViewRenderProcessAction?> Function(
|
||||||
|
InAppWebViewController controller, Uri? url)? onRenderProcessResponsive;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<WebViewRenderProcessAction?> Function(InAppWebViewController controller, Uri? url)? onRenderProcessUnresponsive;
|
final Future<WebViewRenderProcessAction?> Function(
|
||||||
|
InAppWebViewController controller, Uri? url)? onRenderProcessUnresponsive;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<SafeBrowsingResponse?> Function(InAppWebViewController controller, Uri url, SafeBrowsingThreat? threatType)? onSafeBrowsingHit;
|
final Future<SafeBrowsingResponse?> Function(
|
||||||
|
InAppWebViewController controller,
|
||||||
|
Uri url,
|
||||||
|
SafeBrowsingThreat? threatType)? onSafeBrowsingHit;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)? onWebContentProcessDidTerminate;
|
final void Function(InAppWebViewController controller)?
|
||||||
|
onWebContentProcessDidTerminate;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<ShouldAllowDeprecatedTLSAction?> Function(InAppWebViewController controller, URLAuthenticationChallenge challenge)? shouldAllowDeprecatedTLS;
|
final Future<ShouldAllowDeprecatedTLSAction?> Function(
|
||||||
|
InAppWebViewController controller,
|
||||||
|
URLAuthenticationChallenge challenge)? shouldAllowDeprecatedTLS;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<WebResourceResponse?> Function(InAppWebViewController controller, WebResourceRequest request)? shouldInterceptRequest;
|
final Future<WebResourceResponse?> Function(
|
||||||
|
InAppWebViewController controller, WebResourceRequest request)?
|
||||||
|
shouldInterceptRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _InAppWebViewState extends State<InAppWebView> {
|
class _InAppWebViewState extends State<InAppWebView> {
|
||||||
|
@ -484,16 +527,24 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Map<String, dynamic> initialSettings = (widget.initialSettings != null ?
|
Map<String, dynamic> initialSettings = widget.initialSettings?.toMap() ??
|
||||||
widget.initialSettings?.toMap() :
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
widget.initialOptions?.toMap()) ?? {};
|
widget.initialOptions?.toMap() ??
|
||||||
|
{};
|
||||||
|
|
||||||
|
Map<String, dynamic> pullToRefreshSettings =
|
||||||
|
widget.pullToRefreshController?.settings.toMap() ??
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
widget.pullToRefreshController?.options.toMap() ??
|
||||||
|
PullToRefreshSettings(enabled: false).toMap();
|
||||||
|
|
||||||
if (defaultTargetPlatform == TargetPlatform.android) {
|
if (defaultTargetPlatform == TargetPlatform.android) {
|
||||||
var useHybridComposition = (widget.initialSettings != null ?
|
var useHybridComposition = (widget.initialSettings != null
|
||||||
widget.initialSettings?.useHybridComposition :
|
? widget.initialSettings?.useHybridComposition
|
||||||
|
:
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
widget.initialOptions?.android.useHybridComposition) ?? false;
|
widget.initialOptions?.android.useHybridComposition) ??
|
||||||
|
false;
|
||||||
|
|
||||||
if (!useHybridComposition && widget.pullToRefreshController != null) {
|
if (!useHybridComposition && widget.pullToRefreshController != null) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
@ -530,9 +581,7 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
'initialUserScripts':
|
'initialUserScripts':
|
||||||
widget.initialUserScripts?.map((e) => e.toMap()).toList() ??
|
widget.initialUserScripts?.map((e) => e.toMap()).toList() ??
|
||||||
[],
|
[],
|
||||||
'pullToRefreshOptions':
|
'pullToRefreshSettings': pullToRefreshSettings
|
||||||
widget.pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap()
|
|
||||||
},
|
},
|
||||||
creationParamsCodec: const StandardMessageCodec(),
|
creationParamsCodec: const StandardMessageCodec(),
|
||||||
)
|
)
|
||||||
|
@ -558,9 +607,7 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
'implementation': widget.implementation.toValue(),
|
'implementation': widget.implementation.toValue(),
|
||||||
'initialUserScripts':
|
'initialUserScripts':
|
||||||
widget.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
widget.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
||||||
'pullToRefreshOptions':
|
'pullToRefreshSettings': pullToRefreshSettings
|
||||||
widget.pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap()
|
|
||||||
},
|
},
|
||||||
creationParamsCodec: const StandardMessageCodec(),
|
creationParamsCodec: const StandardMessageCodec(),
|
||||||
);
|
);
|
||||||
|
@ -580,9 +627,7 @@ class _InAppWebViewState extends State<InAppWebView> {
|
||||||
'implementation': widget.implementation.toValue(),
|
'implementation': widget.implementation.toValue(),
|
||||||
'initialUserScripts':
|
'initialUserScripts':
|
||||||
widget.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
widget.initialUserScripts?.map((e) => e.toMap()).toList() ?? [],
|
||||||
'pullToRefreshOptions':
|
'pullToRefreshSettings': pullToRefreshSettings
|
||||||
widget.pullToRefreshController?.options.toMap() ??
|
|
||||||
PullToRefreshOptions(enabled: false).toMap()
|
|
||||||
},
|
},
|
||||||
creationParamsCodec: const StandardMessageCodec(),
|
creationParamsCodec: const StandardMessageCodec(),
|
||||||
);
|
);
|
||||||
|
|
|
@ -46,7 +46,8 @@ final _JAVASCRIPT_HANDLER_FORBIDDEN_NAMES = UnmodifiableListView<String>([
|
||||||
///
|
///
|
||||||
///If you are using the [InAppWebView] widget, an [InAppWebViewController] instance can be obtained by setting the [InAppWebView.onWebViewCreated]
|
///If you are using the [InAppWebView] widget, an [InAppWebViewController] instance can be obtained by setting the [InAppWebView.onWebViewCreated]
|
||||||
///callback. Instead, if you are using an [InAppBrowser] instance, you can get it through the [InAppBrowser.webViewController] attribute.
|
///callback. Instead, if you are using an [InAppBrowser] instance, you can get it through the [InAppBrowser.webViewController] attribute.
|
||||||
class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWebViewControllerMixin {
|
class InAppWebViewController
|
||||||
|
with AndroidInAppWebViewControllerMixin, IOSInAppWebViewControllerMixin {
|
||||||
WebView? _webview;
|
WebView? _webview;
|
||||||
late MethodChannel _channel;
|
late MethodChannel _channel;
|
||||||
static MethodChannel _staticChannel = IN_APP_WEBVIEW_STATIC_CHANNEL;
|
static MethodChannel _staticChannel = IN_APP_WEBVIEW_STATIC_CHANNEL;
|
||||||
|
@ -276,21 +277,29 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
if ((_webview != null &&
|
if ((_webview != null &&
|
||||||
(_webview!.onGeolocationPermissionsShowPrompt != null ||
|
(_webview!.onGeolocationPermissionsShowPrompt != null ||
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.androidOnGeolocationPermissionsShowPrompt != null)) ||
|
_webview!.androidOnGeolocationPermissionsShowPrompt !=
|
||||||
|
null)) ||
|
||||||
_inAppBrowser != null) {
|
_inAppBrowser != null) {
|
||||||
String origin = call.arguments["origin"];
|
String origin = call.arguments["origin"];
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onGeolocationPermissionsShowPrompt != null)
|
if (_webview!.onGeolocationPermissionsShowPrompt != null)
|
||||||
return (await _webview!.onGeolocationPermissionsShowPrompt!(this, origin))?.toMap();
|
return (await _webview!.onGeolocationPermissionsShowPrompt!(
|
||||||
|
this, origin))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
|
return (await _webview!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnGeolocationPermissionsShowPrompt!(this, origin))?.toMap();
|
.androidOnGeolocationPermissionsShowPrompt!(this, origin))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onGeolocationPermissionsShowPrompt(origin)) ??
|
return ((await _inAppBrowser!
|
||||||
|
.onGeolocationPermissionsShowPrompt(origin)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnGeolocationPermissionsShowPrompt(origin)))?.toMap();
|
.androidOnGeolocationPermissionsShowPrompt(origin)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -305,8 +314,7 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.androidOnGeolocationPermissionsHidePrompt!(this);
|
_webview!.androidOnGeolocationPermissionsHidePrompt!(this);
|
||||||
}
|
}
|
||||||
}
|
} else if (_inAppBrowser != null) {
|
||||||
else if (_inAppBrowser != null) {
|
|
||||||
_inAppBrowser!.onGeolocationPermissionsHidePrompt();
|
_inAppBrowser!.onGeolocationPermissionsHidePrompt();
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_inAppBrowser!.androidOnGeolocationPermissionsHidePrompt();
|
_inAppBrowser!.androidOnGeolocationPermissionsHidePrompt();
|
||||||
|
@ -324,15 +332,20 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.shouldInterceptRequest != null)
|
if (_webview!.shouldInterceptRequest != null)
|
||||||
return (await _webview!.shouldInterceptRequest!(this, request))?.toMap();
|
return (await _webview!.shouldInterceptRequest!(this, request))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidShouldInterceptRequest!(this, request))?.toMap();
|
return (await _webview!.androidShouldInterceptRequest!(
|
||||||
|
this, request))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.shouldInterceptRequest(request)) ??
|
return ((await _inAppBrowser!.shouldInterceptRequest(request)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidShouldInterceptRequest(request)))?.toMap();
|
.androidShouldInterceptRequest(request)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -347,15 +360,20 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onRenderProcessUnresponsive != null)
|
if (_webview!.onRenderProcessUnresponsive != null)
|
||||||
return (await _webview!.onRenderProcessUnresponsive!(this, uri))?.toMap();
|
return (await _webview!.onRenderProcessUnresponsive!(this, uri))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnRenderProcessUnresponsive!(this, uri))?.toMap();
|
return (await _webview!.androidOnRenderProcessUnresponsive!(
|
||||||
|
this, uri))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onRenderProcessUnresponsive(uri)) ??
|
return ((await _inAppBrowser!.onRenderProcessUnresponsive(uri)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnRenderProcessUnresponsive(uri)))?.toMap();
|
.androidOnRenderProcessUnresponsive(uri)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -370,15 +388,20 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onRenderProcessResponsive != null)
|
if (_webview!.onRenderProcessResponsive != null)
|
||||||
return (await _webview!.onRenderProcessResponsive!(this, uri))?.toMap();
|
return (await _webview!.onRenderProcessResponsive!(this, uri))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnRenderProcessResponsive!(this, uri))?.toMap();
|
return (await _webview!.androidOnRenderProcessResponsive!(
|
||||||
|
this, uri))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onRenderProcessResponsive(uri)) ??
|
return ((await _inAppBrowser!.onRenderProcessResponsive(uri)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnRenderProcessResponsive(uri)))?.toMap();
|
.androidOnRenderProcessResponsive(uri)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -400,8 +423,7 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.androidOnRenderProcessGone!(this, detail);
|
_webview!.androidOnRenderProcessGone!(this, detail);
|
||||||
}
|
}
|
||||||
}
|
} else if (_inAppBrowser != null) {
|
||||||
else if (_inAppBrowser != null) {
|
|
||||||
_inAppBrowser!.onRenderProcessGone(detail);
|
_inAppBrowser!.onRenderProcessGone(detail);
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_inAppBrowser!.androidOnRenderProcessGone(detail);
|
_inAppBrowser!.androidOnRenderProcessGone(detail);
|
||||||
|
@ -422,12 +444,14 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
return (await _webview!.onFormResubmission!(this, uri))?.toMap();
|
return (await _webview!.onFormResubmission!(this, uri))?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnFormResubmission!(this, uri))?.toMap();
|
return (await _webview!.androidOnFormResubmission!(this, uri))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onFormResubmission(uri)) ??
|
return ((await _inAppBrowser!.onFormResubmission(uri)) ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnFormResubmission(uri)))?.toMap();
|
(await _inAppBrowser!.androidOnFormResubmission(uri)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -455,8 +479,8 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "onReceivedIcon":
|
case "onReceivedIcon":
|
||||||
if ((_webview != null && (
|
if ((_webview != null &&
|
||||||
_webview!.onReceivedIcon != null ||
|
(_webview!.onReceivedIcon != null ||
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.androidOnReceivedIcon != null)) ||
|
_webview!.androidOnReceivedIcon != null)) ||
|
||||||
_inAppBrowser != null) {
|
_inAppBrowser != null) {
|
||||||
|
@ -545,8 +569,8 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "onJsBeforeUnload":
|
case "onJsBeforeUnload":
|
||||||
if ((_webview != null && (
|
if ((_webview != null &&
|
||||||
_webview!.onJsBeforeUnload != null ||
|
(_webview!.onJsBeforeUnload != null ||
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.androidOnJsBeforeUnload != null)) ||
|
_webview!.androidOnJsBeforeUnload != null)) ||
|
||||||
_inAppBrowser != null) {
|
_inAppBrowser != null) {
|
||||||
|
@ -557,21 +581,28 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onJsBeforeUnload != null)
|
if (_webview!.onJsBeforeUnload != null)
|
||||||
return (await _webview!.onJsBeforeUnload!(this, jsBeforeUnloadRequest))?.toMap();
|
return (await _webview!.onJsBeforeUnload!(
|
||||||
|
this, jsBeforeUnloadRequest))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnJsBeforeUnload!(this, jsBeforeUnloadRequest))?.toMap();
|
return (await _webview!.androidOnJsBeforeUnload!(
|
||||||
|
this, jsBeforeUnloadRequest))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onJsBeforeUnload(jsBeforeUnloadRequest)) ??
|
return ((await _inAppBrowser!
|
||||||
|
.onJsBeforeUnload(jsBeforeUnloadRequest)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnJsBeforeUnload(jsBeforeUnloadRequest)))?.toMap();
|
.androidOnJsBeforeUnload(jsBeforeUnloadRequest)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "onSafeBrowsingHit":
|
case "onSafeBrowsingHit":
|
||||||
if ((_webview != null && (
|
if ((_webview != null &&
|
||||||
_webview!.onSafeBrowsingHit != null ||
|
(_webview!.onSafeBrowsingHit != null ||
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.androidOnSafeBrowsingHit != null)) ||
|
_webview!.androidOnSafeBrowsingHit != null)) ||
|
||||||
_inAppBrowser != null) {
|
_inAppBrowser != null) {
|
||||||
|
@ -582,15 +613,20 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onSafeBrowsingHit != null)
|
if (_webview!.onSafeBrowsingHit != null)
|
||||||
return (await _webview!.onSafeBrowsingHit!(this, uri, threatType))?.toMap();
|
return (await _webview!.onSafeBrowsingHit!(this, uri, threatType))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnSafeBrowsingHit!(this, uri, threatType))?.toMap();
|
return (await _webview!.androidOnSafeBrowsingHit!(
|
||||||
|
this, uri, threatType))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onSafeBrowsingHit(uri, threatType)) ??
|
return ((await _inAppBrowser!.onSafeBrowsingHit(uri, threatType)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnSafeBrowsingHit(uri, threatType)))?.toMap();
|
.androidOnSafeBrowsingHit(uri, threatType)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -697,15 +733,22 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onPermissionRequest != null)
|
if (_webview!.onPermissionRequest != null)
|
||||||
return (await _webview!.onPermissionRequest!(this, origin, resources))?.toMap();
|
return (await _webview!.onPermissionRequest!(
|
||||||
|
this, origin, resources))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.androidOnPermissionRequest!(this, origin, resources))?.toMap();
|
return (await _webview!.androidOnPermissionRequest!(
|
||||||
|
this, origin, resources))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return ((await _inAppBrowser!.onPermissionRequest(origin, resources)) ??
|
return ((await _inAppBrowser!
|
||||||
|
.onPermissionRequest(origin, resources)) ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.androidOnPermissionRequest(origin, resources)))?.toMap();
|
.androidOnPermissionRequest(origin, resources)))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -751,24 +794,30 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
break;
|
break;
|
||||||
case "onDidReceiveServerRedirectForProvisionalNavigation":
|
case "onDidReceiveServerRedirectForProvisionalNavigation":
|
||||||
if (_webview != null &&
|
if (_webview != null &&
|
||||||
(_webview!.onDidReceiveServerRedirectForProvisionalNavigation != null ||
|
(_webview!.onDidReceiveServerRedirectForProvisionalNavigation !=
|
||||||
|
null ||
|
||||||
|
_webview!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.iosOnDidReceiveServerRedirectForProvisionalNavigation != null)) {
|
.iosOnDidReceiveServerRedirectForProvisionalNavigation !=
|
||||||
if (_webview!.onDidReceiveServerRedirectForProvisionalNavigation != null)
|
null)) {
|
||||||
|
if (_webview!.onDidReceiveServerRedirectForProvisionalNavigation !=
|
||||||
|
null)
|
||||||
_webview!.onDidReceiveServerRedirectForProvisionalNavigation!(this);
|
_webview!.onDidReceiveServerRedirectForProvisionalNavigation!(this);
|
||||||
else {
|
else {
|
||||||
|
_webview!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.iosOnDidReceiveServerRedirectForProvisionalNavigation!(this);
|
.iosOnDidReceiveServerRedirectForProvisionalNavigation!(this);
|
||||||
}
|
}
|
||||||
} else if (_inAppBrowser != null) {
|
} else if (_inAppBrowser != null) {
|
||||||
_inAppBrowser!.onDidReceiveServerRedirectForProvisionalNavigation();
|
_inAppBrowser!.onDidReceiveServerRedirectForProvisionalNavigation();
|
||||||
|
_inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_inAppBrowser!.iosOnDidReceiveServerRedirectForProvisionalNavigation();
|
.iosOnDidReceiveServerRedirectForProvisionalNavigation();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "onNavigationResponse":
|
case "onNavigationResponse":
|
||||||
if ((_webview != null && (
|
if ((_webview != null &&
|
||||||
_webview!.onNavigationResponse != null ||
|
(_webview!.onNavigationResponse != null ||
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
_webview!.iosOnNavigationResponse != null)) ||
|
_webview!.iosOnNavigationResponse != null)) ||
|
||||||
_inAppBrowser != null) {
|
_inAppBrowser != null) {
|
||||||
|
@ -779,19 +828,28 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
IOSWKNavigationResponse.fromMap(arguments)!;
|
IOSWKNavigationResponse.fromMap(arguments)!;
|
||||||
|
|
||||||
NavigationResponse navigationResponse = NavigationResponse.fromMap(arguments)!;
|
NavigationResponse navigationResponse =
|
||||||
|
NavigationResponse.fromMap(arguments)!;
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.onNavigationResponse != null)
|
if (_webview!.onNavigationResponse != null)
|
||||||
return (await _webview!.onNavigationResponse!(this, navigationResponse))?.toMap();
|
return (await _webview!.onNavigationResponse!(
|
||||||
|
this, navigationResponse))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.iosOnNavigationResponse!(this, iosOnNavigationResponse))?.toMap();
|
return (await _webview!.iosOnNavigationResponse!(
|
||||||
|
this, iosOnNavigationResponse))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return (await _inAppBrowser!.onNavigationResponse(navigationResponse))?.toMap() ??
|
return (await _inAppBrowser!
|
||||||
|
.onNavigationResponse(navigationResponse))
|
||||||
|
?.toMap() ??
|
||||||
|
(await _inAppBrowser!
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.iosOnNavigationResponse(iosOnNavigationResponse))?.toMap();
|
.iosOnNavigationResponse(iosOnNavigationResponse))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -808,15 +866,21 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
|
|
||||||
if (_webview != null) {
|
if (_webview != null) {
|
||||||
if (_webview!.shouldAllowDeprecatedTLS != null)
|
if (_webview!.shouldAllowDeprecatedTLS != null)
|
||||||
return (await _webview!.shouldAllowDeprecatedTLS!(this, challenge))?.toMap();
|
return (await _webview!.shouldAllowDeprecatedTLS!(
|
||||||
|
this, challenge))
|
||||||
|
?.toMap();
|
||||||
else {
|
else {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
return (await _webview!.iosShouldAllowDeprecatedTLS!(this, challenge))?.toMap();
|
return (await _webview!.iosShouldAllowDeprecatedTLS!(
|
||||||
|
this, challenge))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return (await _inAppBrowser!.shouldAllowDeprecatedTLS(challenge))?.toMap() ??
|
return (await _inAppBrowser!.shouldAllowDeprecatedTLS(challenge))
|
||||||
|
?.toMap() ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
(await _inAppBrowser!.iosShouldAllowDeprecatedTLS(challenge))?.toMap();
|
(await _inAppBrowser!.iosShouldAllowDeprecatedTLS(challenge))
|
||||||
|
?.toMap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1327,8 +1391,8 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
Uri? iosAllowingReadAccessTo,
|
Uri? iosAllowingReadAccessTo,
|
||||||
Uri? allowingReadAccessTo}) async {
|
Uri? allowingReadAccessTo}) async {
|
||||||
assert(urlRequest.url != null && urlRequest.url.toString().isNotEmpty);
|
assert(urlRequest.url != null && urlRequest.url.toString().isNotEmpty);
|
||||||
assert(allowingReadAccessTo == null ||
|
assert(
|
||||||
allowingReadAccessTo.isScheme("file"));
|
allowingReadAccessTo == null || allowingReadAccessTo.isScheme("file"));
|
||||||
assert(iosAllowingReadAccessTo == null ||
|
assert(iosAllowingReadAccessTo == null ||
|
||||||
iosAllowingReadAccessTo.isScheme("file"));
|
iosAllowingReadAccessTo.isScheme("file"));
|
||||||
|
|
||||||
|
@ -1387,8 +1451,8 @@ class InAppWebViewController with AndroidInAppWebViewControllerMixin, IOSInAppWe
|
||||||
@Deprecated('Use allowingReadAccessTo instead')
|
@Deprecated('Use allowingReadAccessTo instead')
|
||||||
Uri? iosAllowingReadAccessTo,
|
Uri? iosAllowingReadAccessTo,
|
||||||
Uri? allowingReadAccessTo}) async {
|
Uri? allowingReadAccessTo}) async {
|
||||||
assert(allowingReadAccessTo == null ||
|
assert(
|
||||||
allowingReadAccessTo.isScheme("file"));
|
allowingReadAccessTo == null || allowingReadAccessTo.isScheme("file"));
|
||||||
assert(iosAllowingReadAccessTo == null ||
|
assert(iosAllowingReadAccessTo == null ||
|
||||||
iosAllowingReadAccessTo.isScheme("file"));
|
iosAllowingReadAccessTo.isScheme("file"));
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,9 @@ class WebViewOptions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///This class represents all the WebView settings available.
|
///This class represents all the WebView settings available.
|
||||||
class InAppWebViewSettings implements WebViewOptions, BrowserOptions, AndroidOptions, IosOptions {
|
class InAppWebViewSettings
|
||||||
|
implements WebViewOptions, BrowserOptions, AndroidOptions, IosOptions {
|
||||||
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event. The default value is `false`.
|
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event. The default value is `false`.
|
||||||
///
|
///
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
|
@ -1076,7 +1076,8 @@ class InAppWebViewSettings implements WebViewOptions, BrowserOptions, AndroidOpt
|
||||||
defaultTargetPlatform == TargetPlatform.android ? 8 : 0;
|
defaultTargetPlatform == TargetPlatform.android ? 8 : 0;
|
||||||
assert(!this.resourceCustomSchemes.contains("http") &&
|
assert(!this.resourceCustomSchemes.contains("http") &&
|
||||||
!this.resourceCustomSchemes.contains("https"));
|
!this.resourceCustomSchemes.contains("https"));
|
||||||
assert(allowingReadAccessTo == null || allowingReadAccessTo!.isScheme("file"));
|
assert(
|
||||||
|
allowingReadAccessTo == null || allowingReadAccessTo!.isScheme("file"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -1225,8 +1226,7 @@ class InAppWebViewSettings implements WebViewOptions, BrowserOptions, AndroidOpt
|
||||||
List<String> dataDetectorTypesList =
|
List<String> dataDetectorTypesList =
|
||||||
List<String>.from(map["dataDetectorTypes"] ?? []);
|
List<String>.from(map["dataDetectorTypes"] ?? []);
|
||||||
dataDetectorTypesList.forEach((dataDetectorTypeValue) {
|
dataDetectorTypesList.forEach((dataDetectorTypeValue) {
|
||||||
var dataDetectorType =
|
var dataDetectorType = DataDetectorTypes.fromValue(dataDetectorTypeValue);
|
||||||
DataDetectorTypes.fromValue(dataDetectorTypeValue);
|
|
||||||
if (dataDetectorType != null) {
|
if (dataDetectorType != null) {
|
||||||
dataDetectorTypes.add(dataDetectorType);
|
dataDetectorTypes.add(dataDetectorType);
|
||||||
}
|
}
|
||||||
|
@ -1311,14 +1311,11 @@ class InAppWebViewSettings implements WebViewOptions, BrowserOptions, AndroidOpt
|
||||||
instance.useHybridComposition = map["useHybridComposition"];
|
instance.useHybridComposition = map["useHybridComposition"];
|
||||||
instance.useShouldInterceptRequest = map["useShouldInterceptRequest"];
|
instance.useShouldInterceptRequest = map["useShouldInterceptRequest"];
|
||||||
instance.useOnRenderProcessGone = map["useOnRenderProcessGone"];
|
instance.useOnRenderProcessGone = map["useOnRenderProcessGone"];
|
||||||
instance.overScrollMode =
|
instance.overScrollMode = OverScrollMode.fromValue(map["overScrollMode"]);
|
||||||
OverScrollMode.fromValue(map["overScrollMode"]);
|
|
||||||
instance.networkAvailable = map["networkAvailable"];
|
instance.networkAvailable = map["networkAvailable"];
|
||||||
instance.scrollBarStyle =
|
instance.scrollBarStyle = ScrollBarStyle.fromValue(map["scrollBarStyle"]);
|
||||||
ScrollBarStyle.fromValue(map["scrollBarStyle"]);
|
|
||||||
instance.verticalScrollbarPosition =
|
instance.verticalScrollbarPosition =
|
||||||
VerticalScrollbarPosition.fromValue(
|
VerticalScrollbarPosition.fromValue(map["verticalScrollbarPosition"]);
|
||||||
map["verticalScrollbarPosition"]);
|
|
||||||
instance.scrollBarDefaultDelayBeforeFade =
|
instance.scrollBarDefaultDelayBeforeFade =
|
||||||
map["scrollBarDefaultDelayBeforeFade"];
|
map["scrollBarDefaultDelayBeforeFade"];
|
||||||
instance.scrollbarFadingEnabled = map["scrollbarFadingEnabled"];
|
instance.scrollbarFadingEnabled = map["scrollbarFadingEnabled"];
|
||||||
|
@ -1660,7 +1657,6 @@ class InAppWebViewOptions
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var instance = InAppWebViewOptions();
|
var instance = InAppWebViewOptions();
|
||||||
instance.useShouldOverrideUrlLoading = map["useShouldOverrideUrlLoading"];
|
instance.useShouldOverrideUrlLoading = map["useShouldOverrideUrlLoading"];
|
||||||
instance.useOnLoadResource = map["useOnLoadResource"];
|
instance.useOnLoadResource = map["useOnLoadResource"];
|
||||||
|
|
|
@ -29,12 +29,13 @@ abstract class IOSInAppWebViewControllerMixin {
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKWebView.createPdf](https://developer.apple.com/documentation/webkit/wkwebview/3650490-createpdf))
|
///- iOS ([Official API - WKWebView.createPdf](https://developer.apple.com/documentation/webkit/wkwebview/3650490-createpdf))
|
||||||
Future<Uint8List?> createPdf(
|
Future<Uint8List?> createPdf(
|
||||||
|
{@Deprecated("Use pdfConfiguration instead")
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
{@Deprecated("Use pdfConfiguration instead") IOSWKPDFConfiguration? iosWKPdfConfiguration,
|
IOSWKPDFConfiguration? iosWKPdfConfiguration,
|
||||||
PDFConfiguration? pdfConfiguration}) async {
|
PDFConfiguration? pdfConfiguration}) async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent(
|
args.putIfAbsent('pdfConfiguration',
|
||||||
'pdfConfiguration', () => pdfConfiguration?.toMap() ?? iosWKPdfConfiguration?.toMap());
|
() => pdfConfiguration?.toMap() ?? iosWKPdfConfiguration?.toMap());
|
||||||
return await _channel.invokeMethod('createPdf', args);
|
return await _channel.invokeMethod('createPdf', args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -598,8 +598,7 @@ abstract class WebView {
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessUnresponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessUnresponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
final Future<WebViewRenderProcessAction?> Function(
|
final Future<WebViewRenderProcessAction?> Function(
|
||||||
InAppWebViewController controller, Uri? url)?
|
InAppWebViewController controller, Uri? url)? onRenderProcessUnresponsive;
|
||||||
onRenderProcessUnresponsive;
|
|
||||||
|
|
||||||
///Use [onRenderProcessResponsive] instead.
|
///Use [onRenderProcessResponsive] instead.
|
||||||
@Deprecated("Use onRenderProcessResponsive instead")
|
@Deprecated("Use onRenderProcessResponsive instead")
|
||||||
|
@ -620,8 +619,7 @@ abstract class WebView {
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
///- Android native WebView ([Official API - WebViewRenderProcessClient.onRenderProcessResponsive](https://developer.android.com/reference/android/webkit/WebViewRenderProcessClient#onRenderProcessResponsive(android.webkit.WebView,%20android.webkit.WebViewRenderProcess)))
|
||||||
final Future<WebViewRenderProcessAction?> Function(
|
final Future<WebViewRenderProcessAction?> Function(
|
||||||
InAppWebViewController controller, Uri? url)?
|
InAppWebViewController controller, Uri? url)? onRenderProcessResponsive;
|
||||||
onRenderProcessResponsive;
|
|
||||||
|
|
||||||
///Use [onRenderProcessGone] instead.
|
///Use [onRenderProcessGone] instead.
|
||||||
@Deprecated("Use onRenderProcessGone instead")
|
@Deprecated("Use onRenderProcessGone instead")
|
||||||
|
@ -870,45 +868,64 @@ abstract class WebView {
|
||||||
this.onWindowBlur,
|
this.onWindowBlur,
|
||||||
this.onOverScrolled,
|
this.onOverScrolled,
|
||||||
this.onZoomScaleChanged,
|
this.onZoomScaleChanged,
|
||||||
@Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit,
|
@Deprecated('Use onSafeBrowsingHit instead')
|
||||||
|
this.androidOnSafeBrowsingHit,
|
||||||
this.onSafeBrowsingHit,
|
this.onSafeBrowsingHit,
|
||||||
@Deprecated('Use onPermissionRequest instead') this.androidOnPermissionRequest,
|
@Deprecated('Use onPermissionRequest instead')
|
||||||
|
this.androidOnPermissionRequest,
|
||||||
this.onPermissionRequest,
|
this.onPermissionRequest,
|
||||||
@Deprecated('Use onGeolocationPermissionsShowPrompt instead') this.androidOnGeolocationPermissionsShowPrompt,
|
@Deprecated('Use onGeolocationPermissionsShowPrompt instead')
|
||||||
|
this.androidOnGeolocationPermissionsShowPrompt,
|
||||||
this.onGeolocationPermissionsShowPrompt,
|
this.onGeolocationPermissionsShowPrompt,
|
||||||
@Deprecated('Use onGeolocationPermissionsHidePrompt instead') this.androidOnGeolocationPermissionsHidePrompt,
|
@Deprecated('Use onGeolocationPermissionsHidePrompt instead')
|
||||||
|
this.androidOnGeolocationPermissionsHidePrompt,
|
||||||
this.onGeolocationPermissionsHidePrompt,
|
this.onGeolocationPermissionsHidePrompt,
|
||||||
@Deprecated('Use shouldInterceptRequest instead') this.androidShouldInterceptRequest,
|
@Deprecated('Use shouldInterceptRequest instead')
|
||||||
|
this.androidShouldInterceptRequest,
|
||||||
this.shouldInterceptRequest,
|
this.shouldInterceptRequest,
|
||||||
@Deprecated('Use onRenderProcessGone instead') this.androidOnRenderProcessGone,
|
@Deprecated('Use onRenderProcessGone instead')
|
||||||
|
this.androidOnRenderProcessGone,
|
||||||
this.onRenderProcessGone,
|
this.onRenderProcessGone,
|
||||||
@Deprecated('Use onRenderProcessResponsive instead') this.androidOnRenderProcessResponsive,
|
@Deprecated('Use onRenderProcessResponsive instead')
|
||||||
|
this.androidOnRenderProcessResponsive,
|
||||||
this.onRenderProcessResponsive,
|
this.onRenderProcessResponsive,
|
||||||
@Deprecated('Use onRenderProcessUnresponsive instead') this.androidOnRenderProcessUnresponsive,
|
@Deprecated('Use onRenderProcessUnresponsive instead')
|
||||||
|
this.androidOnRenderProcessUnresponsive,
|
||||||
this.onRenderProcessUnresponsive,
|
this.onRenderProcessUnresponsive,
|
||||||
@Deprecated('Use onFormResubmission instead') this.androidOnFormResubmission,
|
@Deprecated('Use onFormResubmission instead')
|
||||||
|
this.androidOnFormResubmission,
|
||||||
this.onFormResubmission,
|
this.onFormResubmission,
|
||||||
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
@Deprecated('Use onZoomScaleChanged instead')
|
||||||
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
this.androidOnScaleChanged,
|
||||||
|
@Deprecated('Use onReceivedIcon instead')
|
||||||
|
this.androidOnReceivedIcon,
|
||||||
this.onReceivedIcon,
|
this.onReceivedIcon,
|
||||||
@Deprecated('Use onReceivedTouchIconUrl instead') this.androidOnReceivedTouchIconUrl,
|
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||||
|
this.androidOnReceivedTouchIconUrl,
|
||||||
this.onReceivedTouchIconUrl,
|
this.onReceivedTouchIconUrl,
|
||||||
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
@Deprecated('Use onJsBeforeUnload instead')
|
||||||
|
this.androidOnJsBeforeUnload,
|
||||||
this.onJsBeforeUnload,
|
this.onJsBeforeUnload,
|
||||||
@Deprecated('Use onReceivedLoginRequest instead') this.androidOnReceivedLoginRequest,
|
@Deprecated('Use onReceivedLoginRequest instead')
|
||||||
|
this.androidOnReceivedLoginRequest,
|
||||||
this.onReceivedLoginRequest,
|
this.onReceivedLoginRequest,
|
||||||
@Deprecated('Use onWebContentProcessDidTerminate instead') this.iosOnWebContentProcessDidTerminate,
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
|
this.iosOnWebContentProcessDidTerminate,
|
||||||
this.onWebContentProcessDidTerminate,
|
this.onWebContentProcessDidTerminate,
|
||||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||||
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
@Deprecated('Use onNavigationResponse instead') this.iosOnNavigationResponse,
|
@Deprecated('Use onNavigationResponse instead')
|
||||||
|
this.iosOnNavigationResponse,
|
||||||
this.onNavigationResponse,
|
this.onNavigationResponse,
|
||||||
@Deprecated('Use shouldAllowDeprecatedTLS instead') this.iosShouldAllowDeprecatedTLS,
|
@Deprecated('Use shouldAllowDeprecatedTLS instead')
|
||||||
|
this.iosShouldAllowDeprecatedTLS,
|
||||||
this.shouldAllowDeprecatedTLS,
|
this.shouldAllowDeprecatedTLS,
|
||||||
this.initialUrlRequest,
|
this.initialUrlRequest,
|
||||||
this.initialFile,
|
this.initialFile,
|
||||||
this.initialData,
|
this.initialData,
|
||||||
@Deprecated('Use initialSettings instead') this.initialOptions,
|
@Deprecated('Use initialSettings instead')
|
||||||
|
this.initialOptions,
|
||||||
this.initialSettings,
|
this.initialSettings,
|
||||||
this.contextMenu,
|
this.contextMenu,
|
||||||
this.initialUserScripts,
|
this.initialUserScripts,
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
export 'pull_to_refresh_controller.dart';
|
export 'pull_to_refresh_controller.dart';
|
||||||
export 'pull_to_refresh_options.dart';
|
export 'pull_to_refresh_settings.dart';
|
||||||
|
|
|
@ -6,7 +6,7 @@ import '../in_app_browser/in_app_browser.dart';
|
||||||
import '../util.dart';
|
import '../util.dart';
|
||||||
import '../types.dart';
|
import '../types.dart';
|
||||||
import '../in_app_webview/in_app_webview_settings.dart';
|
import '../in_app_webview/in_app_webview_settings.dart';
|
||||||
import 'pull_to_refresh_options.dart';
|
import 'pull_to_refresh_settings.dart';
|
||||||
|
|
||||||
///A standard controller that can initiate the refreshing of a scroll view’s contents.
|
///A standard controller that can initiate the refreshing of a scroll view’s contents.
|
||||||
///This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.
|
///This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.
|
||||||
|
@ -16,14 +16,24 @@ import 'pull_to_refresh_options.dart';
|
||||||
///
|
///
|
||||||
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
///**NOTE for Android**: to be able to use the "pull-to-refresh" feature, [InAppWebViewSettings.useHybridComposition] must be `true`.
|
||||||
class PullToRefreshController {
|
class PullToRefreshController {
|
||||||
|
@Deprecated("Use settings instead")
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
late PullToRefreshOptions options;
|
late PullToRefreshOptions options;
|
||||||
|
late PullToRefreshSettings settings;
|
||||||
MethodChannel? _channel;
|
MethodChannel? _channel;
|
||||||
|
|
||||||
///Event called when a swipe gesture triggers a refresh.
|
///Event called when a swipe gesture triggers a refresh.
|
||||||
final void Function()? onRefresh;
|
final void Function()? onRefresh;
|
||||||
|
|
||||||
PullToRefreshController({PullToRefreshOptions? options, this.onRefresh}) {
|
PullToRefreshController(
|
||||||
|
{
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@Deprecated("Use settings instead") PullToRefreshOptions? options,
|
||||||
|
PullToRefreshSettings? settings,
|
||||||
|
this.onRefresh}) {
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.options = options ?? PullToRefreshOptions();
|
this.options = options ?? PullToRefreshOptions();
|
||||||
|
this.settings = settings ?? PullToRefreshSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> handleMethod(MethodCall call) async {
|
Future<dynamic> handleMethod(MethodCall call) async {
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
import 'dart:ui';
|
|
||||||
import '../util.dart';
|
|
||||||
import '../types.dart';
|
|
||||||
|
|
||||||
class PullToRefreshOptions {
|
|
||||||
///Sets whether the pull-to-refresh feature is enabled or not.
|
|
||||||
bool enabled;
|
|
||||||
|
|
||||||
///The color of the refresh control.
|
|
||||||
Color? color;
|
|
||||||
|
|
||||||
///The background color of the refresh control.
|
|
||||||
Color? backgroundColor;
|
|
||||||
|
|
||||||
///The distance to trigger a sync in dips.
|
|
||||||
///
|
|
||||||
///**NOTE**: Available only on Android.
|
|
||||||
int? distanceToTriggerSync;
|
|
||||||
|
|
||||||
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
|
||||||
///
|
|
||||||
///**NOTE**: Available only on Android.
|
|
||||||
int? slingshotDistance;
|
|
||||||
|
|
||||||
///The size of the refresh indicator.
|
|
||||||
///
|
|
||||||
///**NOTE**: Available only on Android.
|
|
||||||
AndroidPullToRefreshSize? size;
|
|
||||||
|
|
||||||
///The title text to display in the refresh control.
|
|
||||||
///
|
|
||||||
///**NOTE**: Available only on iOS.
|
|
||||||
IOSNSAttributedString? attributedTitle;
|
|
||||||
|
|
||||||
PullToRefreshOptions(
|
|
||||||
{this.enabled = true,
|
|
||||||
this.color,
|
|
||||||
this.backgroundColor,
|
|
||||||
this.distanceToTriggerSync,
|
|
||||||
this.slingshotDistance,
|
|
||||||
this.size,
|
|
||||||
this.attributedTitle});
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
|
||||||
return {
|
|
||||||
"enabled": enabled,
|
|
||||||
"color": color?.toHex(),
|
|
||||||
"backgroundColor": backgroundColor?.toHex(),
|
|
||||||
"distanceToTriggerSync": distanceToTriggerSync,
|
|
||||||
"slingshotDistance": slingshotDistance,
|
|
||||||
"size": size?.toValue(),
|
|
||||||
"attributedTitle": attributedTitle?.toMap() ?? {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return this.toMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return toMap().toString();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,128 @@
|
||||||
|
import 'dart:ui';
|
||||||
|
import '../util.dart';
|
||||||
|
import '../types.dart';
|
||||||
|
|
||||||
|
///Pull-To-Refresh Settings
|
||||||
|
class PullToRefreshSettings {
|
||||||
|
///Sets whether the pull-to-refresh feature is enabled or not.
|
||||||
|
bool enabled;
|
||||||
|
|
||||||
|
///The color of the refresh control.
|
||||||
|
Color? color;
|
||||||
|
|
||||||
|
///The background color of the refresh control.
|
||||||
|
Color? backgroundColor;
|
||||||
|
|
||||||
|
///The distance to trigger a sync in dips.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on Android.
|
||||||
|
int? distanceToTriggerSync;
|
||||||
|
|
||||||
|
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on Android.
|
||||||
|
int? slingshotDistance;
|
||||||
|
|
||||||
|
///The size of the refresh indicator.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on Android.
|
||||||
|
PullToRefreshSize? size;
|
||||||
|
|
||||||
|
///The title text to display in the refresh control.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on iOS.
|
||||||
|
AttributedString? attributedTitle;
|
||||||
|
|
||||||
|
PullToRefreshSettings(
|
||||||
|
{this.enabled = true,
|
||||||
|
this.color,
|
||||||
|
this.backgroundColor,
|
||||||
|
this.distanceToTriggerSync,
|
||||||
|
this.slingshotDistance,
|
||||||
|
this.size,
|
||||||
|
this.attributedTitle});
|
||||||
|
|
||||||
|
Map<String, dynamic> toMap() {
|
||||||
|
return {
|
||||||
|
"enabled": enabled,
|
||||||
|
"color": color?.toHex(),
|
||||||
|
"backgroundColor": backgroundColor?.toHex(),
|
||||||
|
"distanceToTriggerSync": distanceToTriggerSync,
|
||||||
|
"slingshotDistance": slingshotDistance,
|
||||||
|
"size": size?.toValue(),
|
||||||
|
"attributedTitle": attributedTitle?.toMap() ?? {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return this.toMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return toMap().toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///Use [PullToRefreshSettings] instead.
|
||||||
|
@Deprecated("Use PullToRefreshSettings instead")
|
||||||
|
class PullToRefreshOptions {
|
||||||
|
///Sets whether the pull-to-refresh feature is enabled or not.
|
||||||
|
bool enabled;
|
||||||
|
|
||||||
|
///The color of the refresh control.
|
||||||
|
Color? color;
|
||||||
|
|
||||||
|
///The background color of the refresh control.
|
||||||
|
Color? backgroundColor;
|
||||||
|
|
||||||
|
///The distance to trigger a sync in dips.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on Android.
|
||||||
|
int? distanceToTriggerSync;
|
||||||
|
|
||||||
|
///The distance in pixels that the refresh indicator can be pulled beyond its resting position.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on Android.
|
||||||
|
int? slingshotDistance;
|
||||||
|
|
||||||
|
///The size of the refresh indicator.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on Android.
|
||||||
|
AndroidPullToRefreshSize? size;
|
||||||
|
|
||||||
|
///The title text to display in the refresh control.
|
||||||
|
///
|
||||||
|
///**NOTE**: Available only on iOS.
|
||||||
|
IOSNSAttributedString? attributedTitle;
|
||||||
|
|
||||||
|
PullToRefreshOptions(
|
||||||
|
{this.enabled = true,
|
||||||
|
this.color,
|
||||||
|
this.backgroundColor,
|
||||||
|
this.distanceToTriggerSync,
|
||||||
|
this.slingshotDistance,
|
||||||
|
this.size,
|
||||||
|
this.attributedTitle});
|
||||||
|
|
||||||
|
Map<String, dynamic> toMap() {
|
||||||
|
return {
|
||||||
|
"enabled": enabled,
|
||||||
|
"color": color?.toHex(),
|
||||||
|
"backgroundColor": backgroundColor?.toHex(),
|
||||||
|
"distanceToTriggerSync": distanceToTriggerSync,
|
||||||
|
"slingshotDistance": slingshotDistance,
|
||||||
|
"size": size?.toValue(),
|
||||||
|
"attributedTitle": attributedTitle?.toMap() ?? {}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return this.toMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return toMap().toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,7 @@ import 'http_auth_credentials_database.dart';
|
||||||
import 'cookie_manager.dart';
|
import 'cookie_manager.dart';
|
||||||
import 'web_storage/web_storage.dart';
|
import 'web_storage/web_storage.dart';
|
||||||
import 'pull_to_refresh/pull_to_refresh_controller.dart';
|
import 'pull_to_refresh/pull_to_refresh_controller.dart';
|
||||||
import 'pull_to_refresh/pull_to_refresh_options.dart';
|
import 'pull_to_refresh/pull_to_refresh_settings.dart';
|
||||||
import 'util.dart';
|
import 'util.dart';
|
||||||
import 'web_message/web_message_listener.dart';
|
import 'web_message/web_message_listener.dart';
|
||||||
import 'web_message/web_message_channel.dart';
|
import 'web_message/web_message_channel.dart';
|
||||||
|
@ -173,12 +173,13 @@ class InAppWebViewInitialData {
|
||||||
this.mimeType = "text/html",
|
this.mimeType = "text/html",
|
||||||
this.encoding = "utf8",
|
this.encoding = "utf8",
|
||||||
Uri? baseUrl,
|
Uri? baseUrl,
|
||||||
@Deprecated('Use historyUrl instead')
|
@Deprecated('Use historyUrl instead') Uri? androidHistoryUrl,
|
||||||
Uri? androidHistoryUrl,
|
|
||||||
Uri? historyUrl}) {
|
Uri? historyUrl}) {
|
||||||
this.baseUrl = baseUrl == null ? Uri.parse("about:blank") : baseUrl;
|
this.baseUrl = baseUrl == null ? Uri.parse("about:blank") : baseUrl;
|
||||||
this.historyUrl = historyUrl == null
|
this.historyUrl = historyUrl == null
|
||||||
? (androidHistoryUrl == null ? Uri.parse("about:blank") : androidHistoryUrl)
|
? (androidHistoryUrl == null
|
||||||
|
? Uri.parse("about:blank")
|
||||||
|
: androidHistoryUrl)
|
||||||
: historyUrl;
|
: historyUrl;
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.androidHistoryUrl = this.historyUrl;
|
this.androidHistoryUrl = this.historyUrl;
|
||||||
|
@ -552,8 +553,11 @@ class JsAlertRequest {
|
||||||
///**NOTE**: available only on iOS.
|
///**NOTE**: available only on iOS.
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
|
||||||
JsAlertRequest({this.url, this.message,
|
JsAlertRequest(
|
||||||
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame, this.isMainFrame}) {
|
{this.url,
|
||||||
|
this.message,
|
||||||
|
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
||||||
|
this.isMainFrame}) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.isMainFrame = this.isMainFrame ?? this.iosIsMainFrame;
|
this.isMainFrame = this.isMainFrame ?? this.iosIsMainFrame;
|
||||||
}
|
}
|
||||||
|
@ -664,8 +668,11 @@ class JsConfirmRequest {
|
||||||
///**NOTE**: available only on iOS.
|
///**NOTE**: available only on iOS.
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
|
||||||
JsConfirmRequest({this.url, this.message,
|
JsConfirmRequest(
|
||||||
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame, this.isMainFrame}) {
|
{this.url,
|
||||||
|
this.message,
|
||||||
|
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
||||||
|
this.isMainFrame}) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.isMainFrame = this.isMainFrame ?? this.iosIsMainFrame;
|
this.isMainFrame = this.isMainFrame ?? this.iosIsMainFrame;
|
||||||
}
|
}
|
||||||
|
@ -785,8 +792,11 @@ class JsPromptRequest {
|
||||||
bool? isMainFrame;
|
bool? isMainFrame;
|
||||||
|
|
||||||
JsPromptRequest(
|
JsPromptRequest(
|
||||||
{this.url, this.message, this.defaultValue,
|
{this.url,
|
||||||
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame, this.isMainFrame}) {
|
this.message,
|
||||||
|
this.defaultValue,
|
||||||
|
@Deprecated("Use isMainFrame instead") this.iosIsMainFrame,
|
||||||
|
this.isMainFrame}) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.isMainFrame = this.isMainFrame ?? this.iosIsMainFrame;
|
this.isMainFrame = this.isMainFrame ?? this.iosIsMainFrame;
|
||||||
}
|
}
|
||||||
|
@ -1327,7 +1337,9 @@ class URLCredential {
|
||||||
@Deprecated("Use persistence instead") this.iosCertificates,
|
@Deprecated("Use persistence instead") this.iosCertificates,
|
||||||
this.certificates}) {
|
this.certificates}) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.persistence = this.persistence ?? URLCredentialPersistence.fromValue(this.iosPersistence?.toValue());
|
this.persistence = this.persistence ??
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
URLCredentialPersistence.fromValue(this.iosPersistence?.toValue());
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.certificates = this.certificates ?? this.iosCertificates;
|
this.certificates = this.certificates ?? this.iosCertificates;
|
||||||
}
|
}
|
||||||
|
@ -1336,10 +1348,12 @@ class URLCredential {
|
||||||
return {
|
return {
|
||||||
"username": username,
|
"username": username,
|
||||||
"password": password,
|
"password": password,
|
||||||
|
"iosCertificates":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosCertificates": (certificates ?? iosCertificates)?.map((e) => e.toMap()).toList(),
|
(certificates ?? iosCertificates)?.map((e) => e.toMap()).toList(),
|
||||||
|
"certificates":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"certificates": (certificates ?? iosCertificates)?.map((e) => e.toMap()).toList(),
|
(certificates ?? iosCertificates)?.map((e) => e.toMap()).toList(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosPersistence": persistence?.toValue() ?? iosPersistence?.toValue(),
|
"iosPersistence": persistence?.toValue() ?? iosPersistence?.toValue(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@ -1374,8 +1388,9 @@ class URLCredential {
|
||||||
certificates: certificates,
|
certificates: certificates,
|
||||||
persistence: URLCredentialPersistence.fromValue(map["persistence"]),
|
persistence: URLCredentialPersistence.fromValue(map["persistence"]),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosPersistence: IOSURLCredentialPersistence.fromValue(map["persistence"])
|
iosPersistence:
|
||||||
);
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSURLCredentialPersistence.fromValue(map["persistence"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
@ -1458,17 +1473,18 @@ class HttpAuthenticationChallenge extends URLAuthenticationChallenge {
|
||||||
///**NOTE**: available only on iOS.
|
///**NOTE**: available only on iOS.
|
||||||
String? error;
|
String? error;
|
||||||
|
|
||||||
HttpAuthenticationChallenge({
|
HttpAuthenticationChallenge(
|
||||||
required this.previousFailureCount,
|
{required this.previousFailureCount,
|
||||||
required URLProtectionSpace protectionSpace,
|
required URLProtectionSpace protectionSpace,
|
||||||
@Deprecated("Use failureResponse instead") this.iosFailureResponse,
|
@Deprecated("Use failureResponse instead") this.iosFailureResponse,
|
||||||
this.failureResponse,
|
this.failureResponse,
|
||||||
this.proposedCredential,
|
this.proposedCredential,
|
||||||
@Deprecated("Use error instead") this.iosError,
|
@Deprecated("Use error instead") this.iosError,
|
||||||
this.error
|
this.error})
|
||||||
}) : super(protectionSpace: protectionSpace) {
|
: super(protectionSpace: protectionSpace) {
|
||||||
|
this.failureResponse = this.failureResponse ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.failureResponse = this.failureResponse ?? URLResponse.fromMap(this.iosFailureResponse?.toMap());
|
URLResponse.fromMap(this.iosFailureResponse?.toMap());
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.error = this.error ?? this.iosError;
|
this.error = this.error ?? this.iosError;
|
||||||
}
|
}
|
||||||
|
@ -1479,10 +1495,12 @@ class HttpAuthenticationChallenge extends URLAuthenticationChallenge {
|
||||||
"previousFailureCount": previousFailureCount,
|
"previousFailureCount": previousFailureCount,
|
||||||
"protectionSpace": protectionSpace.toMap(),
|
"protectionSpace": protectionSpace.toMap(),
|
||||||
"proposedCredential": proposedCredential?.toMap(),
|
"proposedCredential": proposedCredential?.toMap(),
|
||||||
|
"iosFailureResponse":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosFailureResponse": failureResponse?.toMap() ?? iosFailureResponse?.toMap(),
|
failureResponse?.toMap() ?? iosFailureResponse?.toMap(),
|
||||||
|
"failureResponse":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"failureResponse": failureResponse?.toMap() ?? iosFailureResponse?.toMap(),
|
failureResponse?.toMap() ?? iosFailureResponse?.toMap(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosError": error ?? iosError,
|
"iosError": error ?? iosError,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@ -1504,8 +1522,8 @@ class HttpAuthenticationChallenge extends URLAuthenticationChallenge {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosFailureResponse: IOSURLResponse.fromMap(
|
iosFailureResponse: IOSURLResponse.fromMap(
|
||||||
map["failureResponse"]?.cast<String, dynamic>()),
|
map["failureResponse"]?.cast<String, dynamic>()),
|
||||||
failureResponse: URLResponse.fromMap(
|
failureResponse:
|
||||||
map["failureResponse"]?.cast<String, dynamic>()),
|
URLResponse.fromMap(map["failureResponse"]?.cast<String, dynamic>()),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosError: map["error"],
|
iosError: map["error"],
|
||||||
error: map["error"],
|
error: map["error"],
|
||||||
|
@ -1705,8 +1723,7 @@ class URLProtectionSpaceAuthenticationMethod {
|
||||||
.NSURL_AUTHENTICATION_METHOD_CLIENT_CERTIFICATE,
|
.NSURL_AUTHENTICATION_METHOD_CLIENT_CERTIFICATE,
|
||||||
URLProtectionSpaceAuthenticationMethod
|
URLProtectionSpaceAuthenticationMethod
|
||||||
.NSURL_AUTHENTICATION_METHOD_NEGOTIATE,
|
.NSURL_AUTHENTICATION_METHOD_NEGOTIATE,
|
||||||
URLProtectionSpaceAuthenticationMethod
|
URLProtectionSpaceAuthenticationMethod.NSURL_AUTHENTICATION_METHOD_NTLM,
|
||||||
.NSURL_AUTHENTICATION_METHOD_NTLM,
|
|
||||||
URLProtectionSpaceAuthenticationMethod
|
URLProtectionSpaceAuthenticationMethod
|
||||||
.NSURL_AUTHENTICATION_METHOD_SERVER_TRUST,
|
.NSURL_AUTHENTICATION_METHOD_SERVER_TRUST,
|
||||||
].toSet();
|
].toSet();
|
||||||
|
@ -1833,11 +1850,14 @@ class SslError {
|
||||||
///The message associated to the [code].
|
///The message associated to the [code].
|
||||||
String? message;
|
String? message;
|
||||||
|
|
||||||
SslError({@Deprecated('Use code instead') this.androidError,
|
SslError(
|
||||||
|
{@Deprecated('Use code instead') this.androidError,
|
||||||
@Deprecated('Use code instead') this.iosError,
|
@Deprecated('Use code instead') this.iosError,
|
||||||
this.code, this.message}) {
|
this.code,
|
||||||
|
this.message}) {
|
||||||
|
this.code = this.code ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.code = this.code ?? SslErrorType.fromValue(this.androidError?.toValue() ??
|
SslErrorType.fromValue(this.androidError?.toValue() ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.iosError?.toValue());
|
this.iosError?.toValue());
|
||||||
}
|
}
|
||||||
|
@ -1956,26 +1976,36 @@ class URLProtectionSpace {
|
||||||
this.port,
|
this.port,
|
||||||
this.sslCertificate,
|
this.sslCertificate,
|
||||||
this.sslError,
|
this.sslError,
|
||||||
@Deprecated("Use authenticationMethod instead") this.iosAuthenticationMethod,
|
@Deprecated("Use authenticationMethod instead")
|
||||||
|
this.iosAuthenticationMethod,
|
||||||
this.authenticationMethod,
|
this.authenticationMethod,
|
||||||
@Deprecated("Use distinguishedNames instead") this.iosDistinguishedNames,
|
@Deprecated("Use distinguishedNames instead")
|
||||||
|
this.iosDistinguishedNames,
|
||||||
this.distinguishedNames,
|
this.distinguishedNames,
|
||||||
@Deprecated("Use receivesCredentialSecurely instead") this.iosReceivesCredentialSecurely,
|
@Deprecated("Use receivesCredentialSecurely instead")
|
||||||
|
this.iosReceivesCredentialSecurely,
|
||||||
this.receivesCredentialSecurely,
|
this.receivesCredentialSecurely,
|
||||||
@Deprecated("Use isProxy instead") this.iosIsProxy,
|
@Deprecated("Use isProxy instead")
|
||||||
|
this.iosIsProxy,
|
||||||
this.isProxy,
|
this.isProxy,
|
||||||
@Deprecated("Use proxyType instead") this.iosProxyType,
|
@Deprecated("Use proxyType instead")
|
||||||
|
this.iosProxyType,
|
||||||
this.proxyType}) {
|
this.proxyType}) {
|
||||||
|
this.authenticationMethod = this.authenticationMethod ??
|
||||||
|
URLProtectionSpaceAuthenticationMethod.fromValue(
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.authenticationMethod = this.authenticationMethod ?? URLProtectionSpaceAuthenticationMethod.fromValue(this.iosAuthenticationMethod?.toValue());
|
this.iosAuthenticationMethod?.toValue());
|
||||||
|
this.distinguishedNames =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.distinguishedNames = this.distinguishedNames ?? this.iosDistinguishedNames;
|
this.distinguishedNames ?? this.iosDistinguishedNames;
|
||||||
|
this.receivesCredentialSecurely =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.receivesCredentialSecurely = this.receivesCredentialSecurely ?? this.iosReceivesCredentialSecurely;
|
this.receivesCredentialSecurely ?? this.iosReceivesCredentialSecurely;
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.isProxy = this.isProxy ?? this.iosIsProxy;
|
this.isProxy = this.isProxy ?? this.iosIsProxy;
|
||||||
|
this.proxyType = this.proxyType ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.proxyType = this.proxyType ?? URLProtectionSpaceProxyType.fromValue(this.iosProxyType?.toValue());
|
URLProtectionSpaceProxyType.fromValue(this.iosProxyType?.toValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
static URLProtectionSpace? fromMap(Map<String, dynamic>? map) {
|
static URLProtectionSpace? fromMap(Map<String, dynamic>? map) {
|
||||||
|
@ -2036,18 +2066,25 @@ class URLProtectionSpace {
|
||||||
"port": port,
|
"port": port,
|
||||||
"sslCertificate": sslCertificate?.toMap(),
|
"sslCertificate": sslCertificate?.toMap(),
|
||||||
"sslError": sslError?.toMap(),
|
"sslError": sslError?.toMap(),
|
||||||
|
"iosAuthenticationMethod":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosAuthenticationMethod": authenticationMethod ?? iosAuthenticationMethod,
|
authenticationMethod ?? iosAuthenticationMethod,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"authenticationMethod": authenticationMethod ?? iosAuthenticationMethod,
|
"authenticationMethod": authenticationMethod ?? iosAuthenticationMethod,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosDistinguishedNames": (distinguishedNames ?? iosDistinguishedNames)?.map((e) => e.toMap()).toList(),
|
"iosDistinguishedNames": (distinguishedNames ?? iosDistinguishedNames)
|
||||||
|
?.map((e) => e.toMap())
|
||||||
|
.toList(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"distinguishedNames": (distinguishedNames ?? iosDistinguishedNames)?.map((e) => e.toMap()).toList(),
|
"distinguishedNames": (distinguishedNames ?? iosDistinguishedNames)
|
||||||
|
?.map((e) => e.toMap())
|
||||||
|
.toList(),
|
||||||
|
"iosReceivesCredentialSecurely":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosReceivesCredentialSecurely": receivesCredentialSecurely ?? iosReceivesCredentialSecurely,
|
receivesCredentialSecurely ?? iosReceivesCredentialSecurely,
|
||||||
|
"receivesCredentialSecurely":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"receivesCredentialSecurely": receivesCredentialSecurely ?? iosReceivesCredentialSecurely,
|
receivesCredentialSecurely ?? iosReceivesCredentialSecurely,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosIsProxy": isProxy ?? iosIsProxy,
|
"iosIsProxy": isProxy ?? iosIsProxy,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@ -2213,7 +2250,8 @@ class ClientCertResponse {
|
||||||
ClientCertResponse(
|
ClientCertResponse(
|
||||||
{required this.certificatePath,
|
{required this.certificatePath,
|
||||||
this.certificatePassword = "",
|
this.certificatePassword = "",
|
||||||
@Deprecated('Use keyStoreType instead') this.androidKeyStoreType = "PKCS12",
|
@Deprecated('Use keyStoreType instead')
|
||||||
|
this.androidKeyStoreType = "PKCS12",
|
||||||
this.keyStoreType = "PKCS12",
|
this.keyStoreType = "PKCS12",
|
||||||
this.action = ClientCertResponseAction.CANCEL}) {
|
this.action = ClientCertResponseAction.CANCEL}) {
|
||||||
if (this.action == ClientCertResponseAction.PROCEED)
|
if (this.action == ClientCertResponseAction.PROCEED)
|
||||||
|
@ -2454,12 +2492,10 @@ class ActionModeMenuItem {
|
||||||
static const MENU_ITEM_SHARE = const ActionModeMenuItem._internal(1);
|
static const MENU_ITEM_SHARE = const ActionModeMenuItem._internal(1);
|
||||||
|
|
||||||
///Disable menu item "Web Search".
|
///Disable menu item "Web Search".
|
||||||
static const MENU_ITEM_WEB_SEARCH =
|
static const MENU_ITEM_WEB_SEARCH = const ActionModeMenuItem._internal(2);
|
||||||
const ActionModeMenuItem._internal(2);
|
|
||||||
|
|
||||||
///Disable all the action mode menu items for text processing.
|
///Disable all the action mode menu items for text processing.
|
||||||
static const MENU_ITEM_PROCESS_TEXT =
|
static const MENU_ITEM_PROCESS_TEXT = const ActionModeMenuItem._internal(4);
|
||||||
const ActionModeMenuItem._internal(4);
|
|
||||||
|
|
||||||
bool operator ==(value) => value == _value;
|
bool operator ==(value) => value == _value;
|
||||||
|
|
||||||
|
@ -2794,13 +2830,11 @@ class MixedContentMode {
|
||||||
|
|
||||||
///In this mode, the WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.
|
///In this mode, the WebView will allow a secure origin to load content from any other origin, even if that origin is insecure.
|
||||||
///This is the least secure mode of operation for the WebView, and where possible apps should not set this mode.
|
///This is the least secure mode of operation for the WebView, and where possible apps should not set this mode.
|
||||||
static const MIXED_CONTENT_ALWAYS_ALLOW =
|
static const MIXED_CONTENT_ALWAYS_ALLOW = const MixedContentMode._internal(0);
|
||||||
const MixedContentMode._internal(0);
|
|
||||||
|
|
||||||
///In this mode, the WebView will not allow a secure origin to load content from an insecure origin.
|
///In this mode, the WebView will not allow a secure origin to load content from an insecure origin.
|
||||||
///This is the preferred and most secure mode of operation for the WebView and apps are strongly advised to use this mode.
|
///This is the preferred and most secure mode of operation for the WebView and apps are strongly advised to use this mode.
|
||||||
static const MIXED_CONTENT_NEVER_ALLOW =
|
static const MIXED_CONTENT_NEVER_ALLOW = const MixedContentMode._internal(1);
|
||||||
const MixedContentMode._internal(1);
|
|
||||||
|
|
||||||
///In this mode, the WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.
|
///In this mode, the WebView will attempt to be compatible with the approach of a modern web browser with regard to mixed content.
|
||||||
///Some insecure content may be allowed to be loaded by a secure origin and other types of content will be blocked.
|
///Some insecure content may be allowed to be loaded by a secure origin and other types of content will be blocked.
|
||||||
|
@ -3024,8 +3058,7 @@ class DataDetectorTypes {
|
||||||
static const NONE = const DataDetectorTypes._internal("NONE");
|
static const NONE = const DataDetectorTypes._internal("NONE");
|
||||||
|
|
||||||
///Phone numbers are detected and turned into links.
|
///Phone numbers are detected and turned into links.
|
||||||
static const PHONE_NUMBER =
|
static const PHONE_NUMBER = const DataDetectorTypes._internal("PHONE_NUMBER");
|
||||||
const DataDetectorTypes._internal("PHONE_NUMBER");
|
|
||||||
|
|
||||||
///URLs in text are detected and turned into links.
|
///URLs in text are detected and turned into links.
|
||||||
static const LINK = const DataDetectorTypes._internal("LINK");
|
static const LINK = const DataDetectorTypes._internal("LINK");
|
||||||
|
@ -3174,8 +3207,7 @@ class ScrollViewDecelerationRate {
|
||||||
String toString() => _value;
|
String toString() => _value;
|
||||||
|
|
||||||
///The default deceleration rate for a scroll view: `0.998`.
|
///The default deceleration rate for a scroll view: `0.998`.
|
||||||
static const NORMAL =
|
static const NORMAL = const ScrollViewDecelerationRate._internal("NORMAL");
|
||||||
const ScrollViewDecelerationRate._internal("NORMAL");
|
|
||||||
|
|
||||||
///A fast deceleration rate for a scroll view: `0.99`.
|
///A fast deceleration rate for a scroll view: `0.99`.
|
||||||
static const FAST = const ScrollViewDecelerationRate._internal("FAST");
|
static const FAST = const ScrollViewDecelerationRate._internal("FAST");
|
||||||
|
@ -3359,12 +3391,10 @@ class ModalPresentationStyle {
|
||||||
static const CUSTOM = const ModalPresentationStyle._internal(4);
|
static const CUSTOM = const ModalPresentationStyle._internal(4);
|
||||||
|
|
||||||
///A view presentation style in which the presented view covers the screen.
|
///A view presentation style in which the presented view covers the screen.
|
||||||
static const OVER_FULL_SCREEN =
|
static const OVER_FULL_SCREEN = const ModalPresentationStyle._internal(5);
|
||||||
const ModalPresentationStyle._internal(5);
|
|
||||||
|
|
||||||
///A presentation style where the content is displayed over another view controller’s content.
|
///A presentation style where the content is displayed over another view controller’s content.
|
||||||
static const OVER_CURRENT_CONTEXT =
|
static const OVER_CURRENT_CONTEXT = const ModalPresentationStyle._internal(6);
|
||||||
const ModalPresentationStyle._internal(6);
|
|
||||||
|
|
||||||
///A presentation style where the content is displayed in a popover view.
|
///A presentation style where the content is displayed in a popover view.
|
||||||
static const POPOVER = const ModalPresentationStyle._internal(7);
|
static const POPOVER = const ModalPresentationStyle._internal(7);
|
||||||
|
@ -5150,12 +5180,10 @@ class URLRequestNetworkServiceType {
|
||||||
const URLRequestNetworkServiceType._internal(6);
|
const URLRequestNetworkServiceType._internal(6);
|
||||||
|
|
||||||
///A service type for streaming audio/video data.
|
///A service type for streaming audio/video data.
|
||||||
static const AV_STREAMING =
|
static const AV_STREAMING = const URLRequestNetworkServiceType._internal(8);
|
||||||
const URLRequestNetworkServiceType._internal(8);
|
|
||||||
|
|
||||||
///A service type for responsive (time-sensitive) audio/video data.
|
///A service type for responsive (time-sensitive) audio/video data.
|
||||||
static const RESPONSIVE_AV =
|
static const RESPONSIVE_AV = const URLRequestNetworkServiceType._internal(9);
|
||||||
const URLRequestNetworkServiceType._internal(9);
|
|
||||||
|
|
||||||
///A service type for call signaling.
|
///A service type for call signaling.
|
||||||
///
|
///
|
||||||
|
@ -5521,12 +5549,15 @@ class NavigationAction {
|
||||||
this.hasGesture = this.hasGesture ?? this.androidHasGesture;
|
this.hasGesture = this.hasGesture ?? this.androidHasGesture;
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.isRedirect = this.isRedirect ?? this.androidIsRedirect;
|
this.isRedirect = this.isRedirect ?? this.androidIsRedirect;
|
||||||
|
this.navigationType = this.navigationType ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.navigationType = this.navigationType ?? NavigationType.fromValue(this.iosWKNavigationType?.toValue());
|
NavigationType.fromValue(this.iosWKNavigationType?.toValue());
|
||||||
|
this.sourceFrame =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.sourceFrame = this.sourceFrame ?? FrameInfo.fromMap(this.iosSourceFrame?.toMap());
|
this.sourceFrame ?? FrameInfo.fromMap(this.iosSourceFrame?.toMap());
|
||||||
|
this.targetFrame =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.targetFrame = this.targetFrame ?? FrameInfo.fromMap(this.iosTargetFrame?.toMap());
|
this.targetFrame ?? FrameInfo.fromMap(this.iosTargetFrame?.toMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
static NavigationAction? fromMap(Map<String, dynamic>? map) {
|
static NavigationAction? fromMap(Map<String, dynamic>? map) {
|
||||||
|
@ -5543,14 +5574,22 @@ class NavigationAction {
|
||||||
androidIsRedirect: map["isRedirect"] ?? map["androidIsRedirect"],
|
androidIsRedirect: map["isRedirect"] ?? map["androidIsRedirect"],
|
||||||
isRedirect: map["isRedirect"],
|
isRedirect: map["isRedirect"],
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosWKNavigationType: IOSWKNavigationType.fromValue(map["navigationType"]),
|
iosWKNavigationType:
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSWKNavigationType.fromValue(map["navigationType"]),
|
||||||
navigationType: NavigationType.fromValue(map["navigationType"]),
|
navigationType: NavigationType.fromValue(map["navigationType"]),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosSourceFrame: IOSWKFrameInfo.fromMap(map["sourceFrame"]?.cast<String, dynamic>()),
|
iosSourceFrame:
|
||||||
sourceFrame: FrameInfo.fromMap(map["sourceFrame"]?.cast<String, dynamic>()),
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosTargetFrame: IOSWKFrameInfo.fromMap(map["targetFrame"]?.cast<String, dynamic>()),
|
IOSWKFrameInfo.fromMap(map["sourceFrame"]?.cast<String, dynamic>()),
|
||||||
targetFrame: FrameInfo.fromMap(map["targetFrame"]?.cast<String, dynamic>()));
|
sourceFrame:
|
||||||
|
FrameInfo.fromMap(map["sourceFrame"]?.cast<String, dynamic>()),
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
iosTargetFrame:
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSWKFrameInfo.fromMap(map["targetFrame"]?.cast<String, dynamic>()),
|
||||||
|
targetFrame:
|
||||||
|
FrameInfo.fromMap(map["targetFrame"]?.cast<String, dynamic>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
|
@ -5565,10 +5604,12 @@ class NavigationAction {
|
||||||
"isRedirect": isRedirect ?? androidIsRedirect,
|
"isRedirect": isRedirect ?? androidIsRedirect,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"androidIsRedirect": isRedirect ?? androidIsRedirect,
|
"androidIsRedirect": isRedirect ?? androidIsRedirect,
|
||||||
|
"iosWKNavigationType":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosWKNavigationType": navigationType?.toValue() ?? iosWKNavigationType?.toValue(),
|
navigationType?.toValue() ?? iosWKNavigationType?.toValue(),
|
||||||
|
"navigationType":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"navigationType": navigationType?.toValue() ?? iosWKNavigationType?.toValue(),
|
navigationType?.toValue() ?? iosWKNavigationType?.toValue(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosSourceFrame": sourceFrame?.toMap() ?? iosSourceFrame?.toMap(),
|
"iosSourceFrame": sourceFrame?.toMap() ?? iosSourceFrame?.toMap(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@ -5615,24 +5656,31 @@ class CreateWindowAction extends NavigationAction {
|
||||||
|
|
||||||
CreateWindowAction(
|
CreateWindowAction(
|
||||||
{required this.windowId,
|
{required this.windowId,
|
||||||
@Deprecated('Use isDialog instead') this.androidIsDialog,
|
@Deprecated('Use isDialog instead')
|
||||||
|
this.androidIsDialog,
|
||||||
this.isDialog,
|
this.isDialog,
|
||||||
@Deprecated('Use windowFeatures instead') this.iosWindowFeatures,
|
@Deprecated('Use windowFeatures instead')
|
||||||
|
this.iosWindowFeatures,
|
||||||
this.windowFeatures,
|
this.windowFeatures,
|
||||||
required URLRequest request,
|
required URLRequest request,
|
||||||
required bool isForMainFrame,
|
required bool isForMainFrame,
|
||||||
@Deprecated('Use hasGesture instead') bool? androidHasGesture,
|
@Deprecated('Use hasGesture instead')
|
||||||
@Deprecated('Use isRedirect instead') bool? androidIsRedirect,
|
bool? androidHasGesture,
|
||||||
|
@Deprecated('Use isRedirect instead')
|
||||||
|
bool? androidIsRedirect,
|
||||||
bool? hasGesture,
|
bool? hasGesture,
|
||||||
bool? isRedirect,
|
bool? isRedirect,
|
||||||
|
@Deprecated('Use navigationType instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@Deprecated('Use navigationType instead') IOSWKNavigationType? iosWKNavigationType,
|
IOSWKNavigationType? iosWKNavigationType,
|
||||||
NavigationType? navigationType,
|
NavigationType? navigationType,
|
||||||
|
@Deprecated('Use sourceFrame instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@Deprecated('Use sourceFrame instead') IOSWKFrameInfo? iosSourceFrame,
|
IOSWKFrameInfo? iosSourceFrame,
|
||||||
FrameInfo? sourceFrame,
|
FrameInfo? sourceFrame,
|
||||||
|
@Deprecated('Use targetFrame instead')
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
@Deprecated('Use targetFrame instead') IOSWKFrameInfo? iosTargetFrame,
|
IOSWKFrameInfo? iosTargetFrame,
|
||||||
FrameInfo? targetFrame})
|
FrameInfo? targetFrame})
|
||||||
: super(
|
: super(
|
||||||
request: request,
|
request: request,
|
||||||
|
@ -5644,18 +5692,29 @@ class CreateWindowAction extends NavigationAction {
|
||||||
androidIsRedirect: isRedirect ?? androidIsRedirect,
|
androidIsRedirect: isRedirect ?? androidIsRedirect,
|
||||||
isRedirect: isRedirect ?? androidIsRedirect,
|
isRedirect: isRedirect ?? androidIsRedirect,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosWKNavigationType: IOSWKNavigationType.fromValue(navigationType?.toValue()) ?? iosWKNavigationType,
|
iosWKNavigationType:
|
||||||
navigationType: navigationType ?? NavigationType.fromValue(iosWKNavigationType?.toValue()),
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosSourceFrame: IOSWKFrameInfo.fromMap(sourceFrame?.toMap()) ?? iosSourceFrame,
|
IOSWKNavigationType.fromValue(navigationType?.toValue()) ??
|
||||||
sourceFrame: sourceFrame ?? FrameInfo.fromMap(iosSourceFrame?.toMap()),
|
iosWKNavigationType,
|
||||||
|
navigationType: navigationType ??
|
||||||
|
NavigationType.fromValue(iosWKNavigationType?.toValue()),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosTargetFrame: IOSWKFrameInfo.fromMap(targetFrame?.toMap()) ?? iosTargetFrame,
|
iosSourceFrame:
|
||||||
targetFrame: targetFrame ?? FrameInfo.fromMap(iosTargetFrame?.toMap())) {
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSWKFrameInfo.fromMap(sourceFrame?.toMap()) ?? iosSourceFrame,
|
||||||
|
sourceFrame:
|
||||||
|
sourceFrame ?? FrameInfo.fromMap(iosSourceFrame?.toMap()),
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
iosTargetFrame:
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSWKFrameInfo.fromMap(targetFrame?.toMap()) ?? iosTargetFrame,
|
||||||
|
targetFrame:
|
||||||
|
targetFrame ?? FrameInfo.fromMap(iosTargetFrame?.toMap())) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.isDialog = this.isDialog ?? this.androidIsDialog;
|
this.isDialog = this.isDialog ?? this.androidIsDialog;
|
||||||
|
this.windowFeatures = this.windowFeatures ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.windowFeatures = this.windowFeatures ?? WindowFeatures.fromMap(this.iosWindowFeatures?.toMap());
|
WindowFeatures.fromMap(this.iosWindowFeatures?.toMap());
|
||||||
}
|
}
|
||||||
|
|
||||||
static CreateWindowAction? fromMap(Map<String, dynamic>? map) {
|
static CreateWindowAction? fromMap(Map<String, dynamic>? map) {
|
||||||
|
@ -5684,18 +5743,19 @@ class CreateWindowAction extends NavigationAction {
|
||||||
iosWKNavigationType:
|
iosWKNavigationType:
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
IOSWKNavigationType.fromValue(map["navigationType"]),
|
IOSWKNavigationType.fromValue(map["navigationType"]),
|
||||||
navigationType:
|
navigationType: NavigationType.fromValue(map["navigationType"]),
|
||||||
NavigationType.fromValue(map["navigationType"]),
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosSourceFrame: IOSWKFrameInfo.fromMap(
|
iosSourceFrame:
|
||||||
map["sourceFrame"]?.cast<String, dynamic>()),
|
|
||||||
sourceFrame: FrameInfo.fromMap(
|
|
||||||
map["sourceFrame"]?.cast<String, dynamic>()),
|
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosTargetFrame: IOSWKFrameInfo.fromMap(
|
IOSWKFrameInfo.fromMap(map["sourceFrame"]?.cast<String, dynamic>()),
|
||||||
map["targetFrame"]?.cast<String, dynamic>()),
|
sourceFrame:
|
||||||
targetFrame: FrameInfo.fromMap(
|
FrameInfo.fromMap(map["sourceFrame"]?.cast<String, dynamic>()),
|
||||||
map["targetFrame"]?.cast<String, dynamic>()));
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
iosTargetFrame:
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSWKFrameInfo.fromMap(map["targetFrame"]?.cast<String, dynamic>()),
|
||||||
|
targetFrame:
|
||||||
|
FrameInfo.fromMap(map["targetFrame"]?.cast<String, dynamic>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -5707,8 +5767,9 @@ class CreateWindowAction extends NavigationAction {
|
||||||
"androidIsDialog": isDialog ?? androidIsDialog,
|
"androidIsDialog": isDialog ?? androidIsDialog,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"isDialog": isDialog ?? androidIsDialog,
|
"isDialog": isDialog ?? androidIsDialog,
|
||||||
|
"iosWindowFeatures":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosWindowFeatures": windowFeatures?.toMap() ?? iosWindowFeatures?.toMap(),
|
windowFeatures?.toMap() ?? iosWindowFeatures?.toMap(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"windowFeatures": windowFeatures?.toMap() ?? iosWindowFeatures?.toMap(),
|
"windowFeatures": windowFeatures?.toMap() ?? iosWindowFeatures?.toMap(),
|
||||||
});
|
});
|
||||||
|
@ -5854,8 +5915,7 @@ class WebsiteDataType {
|
||||||
|
|
||||||
///IndexedDB databases.
|
///IndexedDB databases.
|
||||||
static const WKWebsiteDataTypeIndexedDBDatabases =
|
static const WKWebsiteDataTypeIndexedDBDatabases =
|
||||||
const WebsiteDataType._internal(
|
const WebsiteDataType._internal("WKWebsiteDataTypeIndexedDBDatabases");
|
||||||
"WKWebsiteDataTypeIndexedDBDatabases");
|
|
||||||
|
|
||||||
///Service worker registrations.
|
///Service worker registrations.
|
||||||
///
|
///
|
||||||
|
@ -6545,8 +6605,7 @@ class ScrollBarStyle {
|
||||||
|
|
||||||
///The scrollbar style to display the scrollbars inside the content area, without increasing the padding.
|
///The scrollbar style to display the scrollbars inside the content area, without increasing the padding.
|
||||||
///The scrollbars will be overlaid with translucency on the view's content.
|
///The scrollbars will be overlaid with translucency on the view's content.
|
||||||
static const SCROLLBARS_INSIDE_OVERLAY =
|
static const SCROLLBARS_INSIDE_OVERLAY = const ScrollBarStyle._internal(0);
|
||||||
const ScrollBarStyle._internal(0);
|
|
||||||
|
|
||||||
///The scrollbar style to display the scrollbars inside the padded area, increasing the padding of the view.
|
///The scrollbar style to display the scrollbars inside the padded area, increasing the padding of the view.
|
||||||
///The scrollbars will not overlap the content area of the view.
|
///The scrollbars will not overlap the content area of the view.
|
||||||
|
@ -7736,7 +7795,10 @@ class UserScript {
|
||||||
ContentWorld? contentWorld}) {
|
ContentWorld? contentWorld}) {
|
||||||
this.contentWorld = contentWorld ?? ContentWorld.PAGE;
|
this.contentWorld = contentWorld ?? ContentWorld.PAGE;
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.forMainFrameOnly = this.iosForMainFrameOnly != null ? this.iosForMainFrameOnly! : this.forMainFrameOnly;
|
this.forMainFrameOnly = this.iosForMainFrameOnly != null
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
? this.iosForMainFrameOnly!
|
||||||
|
: this.forMainFrameOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
|
@ -7989,7 +8051,10 @@ class ScreenshotConfiguration {
|
||||||
this.afterScreenUpdates = true}) {
|
this.afterScreenUpdates = true}) {
|
||||||
assert(this.quality >= 0);
|
assert(this.quality >= 0);
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.afterScreenUpdates = this.iosAfterScreenUpdates != null ? this.iosAfterScreenUpdates! : this.afterScreenUpdates;
|
this.afterScreenUpdates = this.iosAfterScreenUpdates != null
|
||||||
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
? this.iosAfterScreenUpdates!
|
||||||
|
: this.afterScreenUpdates;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
|
@ -8548,8 +8613,7 @@ class NavigationResponse {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return NavigationResponse(
|
return NavigationResponse(
|
||||||
response:
|
response: URLResponse.fromMap(map["response"]?.cast<String, dynamic>()),
|
||||||
URLResponse.fromMap(map["response"]?.cast<String, dynamic>()),
|
|
||||||
isForMainFrame: map["isForMainFrame"],
|
isForMainFrame: map["isForMainFrame"],
|
||||||
canShowMIMEType: map["canShowMIMEType"],
|
canShowMIMEType: map["canShowMIMEType"],
|
||||||
);
|
);
|
||||||
|
@ -8831,43 +8895,57 @@ class URLRequest {
|
||||||
///**NOTE**: available only on iOS.
|
///**NOTE**: available only on iOS.
|
||||||
Uri? mainDocumentURL;
|
Uri? mainDocumentURL;
|
||||||
|
|
||||||
URLRequest(
|
URLRequest({
|
||||||
{required this.url,
|
required this.url,
|
||||||
this.method,
|
this.method,
|
||||||
this.headers,
|
this.headers,
|
||||||
this.body,
|
this.body,
|
||||||
@Deprecated("Use allowsCellularAccess instead") this.iosAllowsCellularAccess,
|
@Deprecated("Use allowsCellularAccess instead")
|
||||||
|
this.iosAllowsCellularAccess,
|
||||||
this.allowsCellularAccess,
|
this.allowsCellularAccess,
|
||||||
@Deprecated("Use allowsConstrainedNetworkAccess instead") this.iosAllowsConstrainedNetworkAccess,
|
@Deprecated("Use allowsConstrainedNetworkAccess instead")
|
||||||
|
this.iosAllowsConstrainedNetworkAccess,
|
||||||
this.allowsConstrainedNetworkAccess,
|
this.allowsConstrainedNetworkAccess,
|
||||||
@Deprecated("Use allowsExpensiveNetworkAccess instead") this.iosAllowsExpensiveNetworkAccess,
|
@Deprecated("Use allowsExpensiveNetworkAccess instead")
|
||||||
|
this.iosAllowsExpensiveNetworkAccess,
|
||||||
this.allowsExpensiveNetworkAccess,
|
this.allowsExpensiveNetworkAccess,
|
||||||
@Deprecated("Use cachePolicy instead") this.iosCachePolicy,
|
@Deprecated("Use cachePolicy instead") this.iosCachePolicy,
|
||||||
this.cachePolicy,
|
this.cachePolicy,
|
||||||
@Deprecated("Use httpShouldHandleCookies instead") this.iosHttpShouldHandleCookies,
|
@Deprecated("Use httpShouldHandleCookies instead")
|
||||||
|
this.iosHttpShouldHandleCookies,
|
||||||
this.httpShouldHandleCookies,
|
this.httpShouldHandleCookies,
|
||||||
@Deprecated("Use httpShouldUsePipelining instead") this.iosHttpShouldUsePipelining,
|
@Deprecated("Use httpShouldUsePipelining instead")
|
||||||
|
this.iosHttpShouldUsePipelining,
|
||||||
this.httpShouldUsePipelining,
|
this.httpShouldUsePipelining,
|
||||||
@Deprecated("Use networkServiceType instead") this.iosNetworkServiceType,
|
@Deprecated("Use networkServiceType instead") this.iosNetworkServiceType,
|
||||||
this.networkServiceType,
|
this.networkServiceType,
|
||||||
@Deprecated("Use timeoutInterval instead") this.iosTimeoutInterval,
|
@Deprecated("Use timeoutInterval instead") this.iosTimeoutInterval,
|
||||||
this.timeoutInterval,
|
this.timeoutInterval,
|
||||||
@Deprecated("Use mainDocumentURL instead") this.iosMainDocumentURL,
|
@Deprecated("Use mainDocumentURL instead") this.iosMainDocumentURL,
|
||||||
this.mainDocumentURL,}) {
|
this.mainDocumentURL,
|
||||||
|
}) {
|
||||||
|
this.allowsCellularAccess =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.allowsCellularAccess = this.allowsCellularAccess ?? this.iosAllowsCellularAccess;
|
this.allowsCellularAccess ?? this.iosAllowsCellularAccess;
|
||||||
|
this.allowsConstrainedNetworkAccess = this.allowsConstrainedNetworkAccess ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.allowsConstrainedNetworkAccess = this.allowsConstrainedNetworkAccess ?? this.iosAllowsConstrainedNetworkAccess;
|
this.iosAllowsConstrainedNetworkAccess;
|
||||||
|
this.allowsExpensiveNetworkAccess = this.allowsExpensiveNetworkAccess ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.allowsExpensiveNetworkAccess = this.allowsExpensiveNetworkAccess ?? this.iosAllowsExpensiveNetworkAccess;
|
this.iosAllowsExpensiveNetworkAccess;
|
||||||
|
this.cachePolicy = this.cachePolicy ??
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.cachePolicy = this.cachePolicy ?? URLRequestCachePolicy.fromValue(this.iosCachePolicy?.toValue());
|
URLRequestCachePolicy.fromValue(this.iosCachePolicy?.toValue());
|
||||||
|
this.httpShouldHandleCookies =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.httpShouldHandleCookies = this.httpShouldHandleCookies ?? this.iosHttpShouldHandleCookies;
|
this.httpShouldHandleCookies ?? this.iosHttpShouldHandleCookies;
|
||||||
|
this.httpShouldUsePipelining =
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.httpShouldUsePipelining = this.httpShouldUsePipelining ?? this.iosHttpShouldUsePipelining;
|
this.httpShouldUsePipelining ?? this.iosHttpShouldUsePipelining;
|
||||||
|
this.networkServiceType =
|
||||||
|
this.networkServiceType ?? URLRequestNetworkServiceType.fromValue(
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.networkServiceType = this.networkServiceType ?? URLRequestNetworkServiceType.fromValue(this.iosNetworkServiceType?.toValue());
|
this.iosNetworkServiceType?.toValue());
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.timeoutInterval = this.timeoutInterval ?? this.iosTimeoutInterval;
|
this.timeoutInterval = this.timeoutInterval ?? this.iosTimeoutInterval;
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@ -8902,8 +8980,11 @@ class URLRequest {
|
||||||
iosHttpShouldUsePipelining: map["httpShouldUsePipelining"],
|
iosHttpShouldUsePipelining: map["httpShouldUsePipelining"],
|
||||||
httpShouldUsePipelining: map["httpShouldUsePipelining"],
|
httpShouldUsePipelining: map["httpShouldUsePipelining"],
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosNetworkServiceType: IOSURLRequestNetworkServiceType.fromValue(map["networkServiceType"]),
|
iosNetworkServiceType:
|
||||||
networkServiceType: URLRequestNetworkServiceType.fromValue(map["networkServiceType"]),
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
IOSURLRequestNetworkServiceType.fromValue(map["networkServiceType"]),
|
||||||
|
networkServiceType:
|
||||||
|
URLRequestNetworkServiceType.fromValue(map["networkServiceType"]),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
iosTimeoutInterval: map["timeoutInterval"],
|
iosTimeoutInterval: map["timeoutInterval"],
|
||||||
timeoutInterval: map["timeoutInterval"],
|
timeoutInterval: map["timeoutInterval"],
|
||||||
|
@ -8923,34 +9004,45 @@ class URLRequest {
|
||||||
"headers": headers,
|
"headers": headers,
|
||||||
"method": method,
|
"method": method,
|
||||||
"body": body,
|
"body": body,
|
||||||
|
"iosAllowsCellularAccess":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosAllowsCellularAccess": allowsCellularAccess ?? iosAllowsCellularAccess,
|
allowsCellularAccess ?? iosAllowsCellularAccess,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"allowsCellularAccess": allowsCellularAccess ?? iosAllowsCellularAccess,
|
"allowsCellularAccess": allowsCellularAccess ?? iosAllowsCellularAccess,
|
||||||
|
"iosAllowsConstrainedNetworkAccess":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosAllowsConstrainedNetworkAccess": allowsConstrainedNetworkAccess ?? iosAllowsConstrainedNetworkAccess,
|
allowsConstrainedNetworkAccess ?? iosAllowsConstrainedNetworkAccess,
|
||||||
|
"allowsConstrainedNetworkAccess":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"allowsConstrainedNetworkAccess": allowsConstrainedNetworkAccess ?? iosAllowsConstrainedNetworkAccess,
|
allowsConstrainedNetworkAccess ?? iosAllowsConstrainedNetworkAccess,
|
||||||
|
"iosAllowsExpensiveNetworkAccess":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosAllowsExpensiveNetworkAccess": allowsExpensiveNetworkAccess ?? iosAllowsExpensiveNetworkAccess,
|
allowsExpensiveNetworkAccess ?? iosAllowsExpensiveNetworkAccess,
|
||||||
|
"allowsExpensiveNetworkAccess":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"allowsExpensiveNetworkAccess": allowsExpensiveNetworkAccess ?? iosAllowsExpensiveNetworkAccess,
|
allowsExpensiveNetworkAccess ?? iosAllowsExpensiveNetworkAccess,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosCachePolicy": cachePolicy?.toValue() ?? iosCachePolicy?.toValue(),
|
"iosCachePolicy": cachePolicy?.toValue() ?? iosCachePolicy?.toValue(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"cachePolicy": cachePolicy?.toValue() ?? iosCachePolicy?.toValue(),
|
"cachePolicy": cachePolicy?.toValue() ?? iosCachePolicy?.toValue(),
|
||||||
|
"iosHttpShouldHandleCookies":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosHttpShouldHandleCookies": httpShouldHandleCookies ?? iosHttpShouldHandleCookies,
|
httpShouldHandleCookies ?? iosHttpShouldHandleCookies,
|
||||||
|
"httpShouldHandleCookies":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"httpShouldHandleCookies": httpShouldHandleCookies ?? iosHttpShouldHandleCookies,
|
httpShouldHandleCookies ?? iosHttpShouldHandleCookies,
|
||||||
|
"iosHttpShouldUsePipelining":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosHttpShouldUsePipelining": httpShouldUsePipelining ?? iosHttpShouldUsePipelining,
|
httpShouldUsePipelining ?? iosHttpShouldUsePipelining,
|
||||||
|
"httpShouldUsePipelining":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"httpShouldUsePipelining": httpShouldUsePipelining ?? iosHttpShouldUsePipelining,
|
httpShouldUsePipelining ?? iosHttpShouldUsePipelining,
|
||||||
|
"iosNetworkServiceType":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosNetworkServiceType": networkServiceType?.toValue() ?? iosNetworkServiceType?.toValue(),
|
networkServiceType?.toValue() ?? iosNetworkServiceType?.toValue(),
|
||||||
|
"networkServiceType":
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"networkServiceType": networkServiceType?.toValue() ?? iosNetworkServiceType?.toValue(),
|
networkServiceType?.toValue() ?? iosNetworkServiceType?.toValue(),
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
"iosTimeoutInterval": timeoutInterval ?? iosTimeoutInterval,
|
"iosTimeoutInterval": timeoutInterval ?? iosTimeoutInterval,
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
|
@ -9123,7 +9215,7 @@ class IOSWKWindowFeatures {
|
||||||
}
|
}
|
||||||
|
|
||||||
///Class that represents a string with associated attributes
|
///Class that represents a string with associated attributes
|
||||||
///used by the [PullToRefreshController] and [PullToRefreshOptions] classes.
|
///used by the [PullToRefreshController] and [PullToRefreshSettings] classes.
|
||||||
class AttributedString {
|
class AttributedString {
|
||||||
///The characters for the new object.
|
///The characters for the new object.
|
||||||
String string;
|
String string;
|
||||||
|
@ -9999,10 +10091,11 @@ class TrustedWebActivityImmersiveDisplayMode
|
||||||
this.displayCutoutMode = LayoutInDisplayCutoutMode.DEFAULT,
|
this.displayCutoutMode = LayoutInDisplayCutoutMode.DEFAULT,
|
||||||
this.layoutInDisplayCutoutMode}) {
|
this.layoutInDisplayCutoutMode}) {
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
this.displayCutoutMode = this.layoutInDisplayCutoutMode != null ?
|
this.displayCutoutMode = this.layoutInDisplayCutoutMode != null
|
||||||
|
? LayoutInDisplayCutoutMode.fromValue(
|
||||||
// ignore: deprecated_member_use_from_same_package
|
// ignore: deprecated_member_use_from_same_package
|
||||||
LayoutInDisplayCutoutMode.fromValue(this.layoutInDisplayCutoutMode!.toValue())! :
|
this.layoutInDisplayCutoutMode!.toValue())!
|
||||||
this.displayCutoutMode;
|
: this.displayCutoutMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TrustedWebActivityImmersiveDisplayMode? fromMap(
|
static TrustedWebActivityImmersiveDisplayMode? fromMap(
|
||||||
|
@ -10088,8 +10181,7 @@ class LayoutInDisplayCutoutMode {
|
||||||
///Content renders into the cutout area in both portrait and landscape modes.
|
///Content renders into the cutout area in both portrait and landscape modes.
|
||||||
///
|
///
|
||||||
///**NOTE**: available on Android 28+.
|
///**NOTE**: available on Android 28+.
|
||||||
static const SHORT_EDGES =
|
static const SHORT_EDGES = const LayoutInDisplayCutoutMode._internal(1);
|
||||||
const LayoutInDisplayCutoutMode._internal(1);
|
|
||||||
|
|
||||||
///Content never renders into the cutout area.
|
///Content never renders into the cutout area.
|
||||||
///
|
///
|
||||||
|
|
|
@ -6,7 +6,6 @@ import '_static_channel.dart';
|
||||||
import 'android/web_storage_manager.dart';
|
import 'android/web_storage_manager.dart';
|
||||||
import 'ios/web_storage_manager.dart';
|
import 'ios/web_storage_manager.dart';
|
||||||
|
|
||||||
|
|
||||||
import '../types.dart';
|
import '../types.dart';
|
||||||
|
|
||||||
///Class that implements a singleton object (shared instance) which manages the web storage used by WebView instances.
|
///Class that implements a singleton object (shared instance) which manages the web storage used by WebView instances.
|
||||||
|
@ -174,8 +173,7 @@ class WebStorageManager {
|
||||||
///**Supported Platforms/Implementations**:
|
///**Supported Platforms/Implementations**:
|
||||||
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
///- iOS ([Official API - WKWebsiteDataStore.removeData](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/1532938-removedata))
|
||||||
Future<void> removeDataModifiedSince(
|
Future<void> removeDataModifiedSince(
|
||||||
{required Set<WebsiteDataType> dataTypes,
|
{required Set<WebsiteDataType> dataTypes, required DateTime date}) async {
|
||||||
required DateTime date}) async {
|
|
||||||
List<String> dataTypesList = [];
|
List<String> dataTypesList = [];
|
||||||
for (var dataType in dataTypes) {
|
for (var dataType in dataTypes) {
|
||||||
dataTypesList.add(dataType.toValue());
|
dataTypesList.add(dataType.toValue());
|
||||||
|
|
Loading…
Reference in New Issue