diff --git a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java index 0ed6aa1f..7a2459fc 100755 --- a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java +++ b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/PlatformUtil.java @@ -52,10 +52,10 @@ public class PlatformUtil extends ChannelDelegateImpl { if (locale == null) { return Locale.US; } - String[] localeSplitted = locale.split("_"); - String language = localeSplitted[0]; - String country = localeSplitted.length > 1 ? localeSplitted[1] : ""; - String variant = localeSplitted.length > 2 ? localeSplitted[2] : ""; + String[] localeSplit = locale.split("_"); + String language = localeSplit[0]; + String country = localeSplit.length > 1 ? localeSplit[1] : ""; + String variant = localeSplit.length > 2 ? localeSplit[2] : ""; return new Locale(language, country, variant); } diff --git a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/Util.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/Util.java index c82ab02a..a5378b7c 100755 --- a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/Util.java +++ b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/Util.java @@ -202,7 +202,7 @@ public class Util { /** * SslCertificate class does not has a public getter for the underlying - * X509Certificate, we can only do this by hack. This only works for andorid 4.0+ + * X509Certificate, we can only do this by hack. This only works for Android 4.0+ * https://groups.google.com/forum/#!topic/android-developers/eAPJ6b7mrmg */ public static X509Certificate getX509CertFromSslCertHack(SslCertificate sslCert) { diff --git a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/content_blocker/ContentBlockerHandler.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/content_blocker/ContentBlockerHandler.java index 6badbc86..8564dbe8 100755 --- a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/content_blocker/ContentBlockerHandler.java +++ b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/content_blocker/ContentBlockerHandler.java @@ -62,8 +62,8 @@ public class ContentBlockerHandler { try { u = new URI(url); } catch (URISyntaxException e) { - String[] urlSplitted = url.split(":"); - String scheme = urlSplitted[0]; + String[] urlSplit = url.split(":"); + String scheme = urlSplit[0]; URL tempUrl = new URL(url.replace(scheme, "https")); u = new URI(scheme, tempUrl.getUserInfo(), tempUrl.getHost(), tempUrl.getPort(), tempUrl.getPath(), tempUrl.getQuery(), tempUrl.getRef()); } @@ -202,11 +202,11 @@ public class ContentBlockerHandler { if (contentType == null) { contentType = "text/plain"; } else { - String[] contentTypeSplitted = contentType.split(";"); - contentType = contentTypeSplitted[0].trim(); + String[] contentTypeSplit = contentType.split(";"); + contentType = contentTypeSplit[0].trim(); if (encoding == null) { - encoding = (contentTypeSplitted.length > 1 && contentTypeSplitted[1].contains("charset=")) - ? contentTypeSplitted[1].replace("charset=", "").trim() + encoding = (contentTypeSplit.length > 1 && contentTypeSplit[1].contains("charset=")) + ? contentTypeSplit[1].replace("charset=", "").trim() : "utf-8"; } } @@ -245,11 +245,11 @@ public class ContentBlockerHandler { // byte[] dataBytes = response.body().bytes(); // InputStream dataStream = new ByteArrayInputStream(dataBytes); // -// String[] contentTypeSplitted = response.header("content-type", "text/plain").split(";"); +// String[] contentTypeSplit = response.header("content-type", "text/plain").split(";"); // -// String contentType = contentTypeSplitted[0].trim(); -// String encoding = (contentTypeSplitted.length > 1 && contentTypeSplitted[1].contains("charset=")) -// ? contentTypeSplitted[1].replace("charset=", "").trim() +// String contentType = contentTypeSplit[0].trim(); +// String encoding = (contentTypeSplit.length > 1 && contentTypeSplit[1].contains("charset=")) +// ? contentTypeSplit[1].replace("charset=", "").trim() // : "utf-8"; // // response.body().close(); @@ -297,8 +297,8 @@ public class ContentBlockerHandler { try { String contentType = urlConnection.getContentType(); if (contentType != null) { - String[] contentTypeSplitted = contentType.split(";"); - contentType = contentTypeSplitted[0].trim(); + String[] contentTypeSplit = contentType.split(";"); + contentType = contentTypeSplit[0].trim(); responseResourceType = getResourceTypeFromContentType(contentType); } } catch (Exception e) { diff --git a/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview_controller.dart b/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview_controller.dart index 9bb24a73..ceb4bc9a 100644 --- a/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview_controller.dart @@ -1589,8 +1589,8 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController } if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - var assetPath = assetPathSplitted[assetPathSplitted.length - 1]; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + var assetPath = assetPathSplit[assetPathSplit.length - 1]; try { var bytes = await rootBundle.load(assetPath); html = utf8.decode(bytes.buffer.asUint8List()); @@ -1628,8 +1628,8 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController var assetPathBase; if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - assetPathBase = assetPathSplitted[0] + "/flutter_assets/"; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + assetPathBase = assetPathSplit[0] + "/flutter_assets/"; } InAppWebViewSettings? settings = await getSettings(); @@ -1745,7 +1745,7 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController String urlIcon, String? rel, String? sizes, bool isManifest) { List favicons = []; - List urlSplitted = urlIcon.split("/"); + List urlSplit = urlIcon.split("/"); if (!_isUrlAbsolute(urlIcon)) { if (urlIcon.startsWith("/")) { urlIcon = urlIcon.substring(1); @@ -1757,15 +1757,15 @@ class AndroidInAppWebViewController extends PlatformInAppWebViewController } if (isManifest) { rel = (sizes != null) - ? urlSplitted[urlSplitted.length - 1] + ? urlSplit[urlSplit.length - 1] .replaceFirst("-" + sizes, "") .split(" ")[0] .split(".")[0] : null; } if (sizes != null && sizes.isNotEmpty && sizes != "any") { - List sizesSplitted = sizes.split(" "); - for (String size in sizesSplitted) { + List sizesSplit = sizes.split(" "); + for (String size in sizesSplit) { int width = int.parse(size.split("x")[0]); int height = int.parse(size.split("x")[1]); favicons.add(Favicon( diff --git a/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift b/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift index 8ed74312..c7543478 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppBrowser/InAppBrowserWebViewController.swift @@ -62,8 +62,8 @@ public class InAppBrowserWebViewController: UIViewController, InAppBrowserDelega channelDelegate = InAppBrowserChannelDelegate(channel: channel) var userScripts: [UserScript] = [] - for intialUserScript in initialUserScripts { - userScripts.append(UserScript.fromMap(map: intialUserScript, windowId: windowId)!) + for initialUserScript in initialUserScripts { + userScripts.append(UserScript.fromMap(map: initialUserScript, windowId: windowId)!) } let preWebviewConfiguration = InAppWebView.preWKWebViewConfiguration(settings: webViewSettings) diff --git a/flutter_inappwebview_ios/ios/Classes/InAppWebView/CustomSchemeHandler.swift b/flutter_inappwebview_ios/ios/Classes/InAppWebView/CustomSchemeHandler.swift index 1dd22923..22abdf24 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppWebView/CustomSchemeHandler.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppWebView/CustomSchemeHandler.swift @@ -1,5 +1,5 @@ // -// CustomeSchemeHandler.swift +// CustomSchemeHandler.swift // flutter_inappwebview // // Created by Lorenzo Pichilli on 25/10/2019. diff --git a/flutter_inappwebview_ios/ios/Classes/InAppWebView/FlutterWebViewController.swift b/flutter_inappwebview_ios/ios/Classes/InAppWebView/FlutterWebViewController.swift index 3be8d5bc..9a0d0690 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppWebView/FlutterWebViewController.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppWebView/FlutterWebViewController.swift @@ -29,8 +29,8 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView, Disposable var userScripts: [UserScript] = [] if let initialUserScripts = initialUserScripts { - for intialUserScript in initialUserScripts { - userScripts.append(UserScript.fromMap(map: intialUserScript, windowId: windowId)!) + for initialUserScript in initialUserScripts { + userScripts.append(UserScript.fromMap(map: initialUserScript, windowId: windowId)!) } } diff --git a/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift b/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift index f4988824..a2aca5a3 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift @@ -1982,7 +1982,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, switch action { case 0: InAppWebView.credentialsProposed = [] - // used .performDefaultHandling to mantain consistency with Android + // used .performDefaultHandling to maintain consistency with Android // because .cancelAuthenticationChallenge will call webView(_:didFail:withError:) completionHandler(.performDefaultHandling, nil) //completionHandler(.cancelAuthenticationChallenge, nil) diff --git a/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebViewManager.swift b/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebViewManager.swift index 079f1303..df5c3b59 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebViewManager.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebViewManager.swift @@ -62,7 +62,7 @@ public class InAppWebViewManager: ChannelDelegate { webViewForUserAgent?.evaluateJavaScript("navigator.userAgent") { (value, error) in if error != nil { - print("Error occured to get userAgent") + print("Error occurred to get userAgent") self.webViewForUserAgent = nil completionHandler(nil) return diff --git a/flutter_inappwebview_ios/ios/Classes/PluginScriptsJS/FindTextHighlightJS.swift b/flutter_inappwebview_ios/ios/Classes/PluginScriptsJS/FindTextHighlightJS.swift index a61a05b7..f0db6145 100644 --- a/flutter_inappwebview_ios/ios/Classes/PluginScriptsJS/FindTextHighlightJS.swift +++ b/flutter_inappwebview_ios/ios/Classes/PluginScriptsJS/FindTextHighlightJS.swift @@ -111,7 +111,7 @@ window.\(JAVASCRIPT_BRIDGE_NAME)._findAllAsync = function(keyword) { ); } -// helper function, recursively removes the highlights in elements and their childs +// helper function, recursively removes the highlights in elements and their children window.\(JAVASCRIPT_BRIDGE_NAME)._clearMatchesForElement = function(element) { if (element) { if (element.nodeType == 1) { diff --git a/flutter_inappwebview_ios/ios/Classes/Types/URLProtectionSpace.swift b/flutter_inappwebview_ios/ios/Classes/Types/URLProtectionSpace.swift index 75557e17..3d6b9022 100644 --- a/flutter_inappwebview_ios/ios/Classes/Types/URLProtectionSpace.swift +++ b/flutter_inappwebview_ios/ios/Classes/Types/URLProtectionSpace.swift @@ -49,7 +49,7 @@ extension URLProtectionSpace { public func toMap () -> [String:Any?] { return [ "host": host, - "procotol": self.protocol, + "protocol": self.protocol, "realm": realm, "port": port, "sslCertificate": sslCertificate?.toMap(), diff --git a/flutter_inappwebview_ios/ios/Classes/Util.swift b/flutter_inappwebview_ios/ios/Classes/Util.swift index 799a4cae..9992ece9 100644 --- a/flutter_inappwebview_ios/ios/Classes/Util.swift +++ b/flutter_inappwebview_ios/ios/Classes/Util.swift @@ -177,10 +177,10 @@ public class Util { } if let ipv4Range = Range(match.range(at: 2), in: address) { let ipv4 = address[ipv4Range] - let ipv4Splitted = ipv4.split(separator: ".") + let ipv4Split = ipv4.split(separator: ".") var ipv4Converted = Array(repeating: "0000", count: 4) for i in 0...3 { - let byte = Int(ipv4Splitted[i])! + let byte = Int(ipv4Split[i])! let hex = ("0" + String(byte, radix: 16)) var offset = hex.count - 3 offset = offset < 0 ? 0 : offset diff --git a/flutter_inappwebview_ios/lib/src/in_app_webview/in_app_webview_controller.dart b/flutter_inappwebview_ios/lib/src/in_app_webview/in_app_webview_controller.dart index b1232a7c..7e847f14 100644 --- a/flutter_inappwebview_ios/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/flutter_inappwebview_ios/lib/src/in_app_webview/in_app_webview_controller.dart @@ -1585,8 +1585,8 @@ class IOSInAppWebViewController extends PlatformInAppWebViewController } if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - var assetPath = assetPathSplitted[assetPathSplitted.length - 1]; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + var assetPath = assetPathSplit[assetPathSplit.length - 1]; try { var bytes = await rootBundle.load(assetPath); html = utf8.decode(bytes.buffer.asUint8List()); @@ -1624,8 +1624,8 @@ class IOSInAppWebViewController extends PlatformInAppWebViewController var assetPathBase; if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - assetPathBase = assetPathSplitted[0] + "/flutter_assets/"; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + assetPathBase = assetPathSplit[0] + "/flutter_assets/"; } InAppWebViewSettings? settings = await getSettings(); @@ -1741,7 +1741,7 @@ class IOSInAppWebViewController extends PlatformInAppWebViewController String urlIcon, String? rel, String? sizes, bool isManifest) { List favicons = []; - List urlSplitted = urlIcon.split("/"); + List urlSplit = urlIcon.split("/"); if (!_isUrlAbsolute(urlIcon)) { if (urlIcon.startsWith("/")) { urlIcon = urlIcon.substring(1); @@ -1753,15 +1753,15 @@ class IOSInAppWebViewController extends PlatformInAppWebViewController } if (isManifest) { rel = (sizes != null) - ? urlSplitted[urlSplitted.length - 1] + ? urlSplit[urlSplit.length - 1] .replaceFirst("-" + sizes, "") .split(" ")[0] .split(".")[0] : null; } if (sizes != null && sizes.isNotEmpty && sizes != "any") { - List sizesSplitted = sizes.split(" "); - for (String size in sizesSplitted) { + List sizesSplit = sizes.split(" "); + for (String size in sizesSplit) { int width = int.parse(size.split("x")[0]); int height = int.parse(size.split("x")[1]); favicons.add(Favicon( diff --git a/flutter_inappwebview_macos/lib/src/in_app_webview/in_app_webview_controller.dart b/flutter_inappwebview_macos/lib/src/in_app_webview/in_app_webview_controller.dart index 40ea29ff..38ab1bc7 100644 --- a/flutter_inappwebview_macos/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/flutter_inappwebview_macos/lib/src/in_app_webview/in_app_webview_controller.dart @@ -1586,8 +1586,8 @@ class MacOSInAppWebViewController extends PlatformInAppWebViewController } if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - var assetPath = assetPathSplitted[assetPathSplitted.length - 1]; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + var assetPath = assetPathSplit[assetPathSplit.length - 1]; try { var bytes = await rootBundle.load(assetPath); html = utf8.decode(bytes.buffer.asUint8List()); @@ -1625,8 +1625,8 @@ class MacOSInAppWebViewController extends PlatformInAppWebViewController var assetPathBase; if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - assetPathBase = assetPathSplitted[0] + "/flutter_assets/"; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + assetPathBase = assetPathSplit[0] + "/flutter_assets/"; } InAppWebViewSettings? settings = await getSettings(); @@ -1742,7 +1742,7 @@ class MacOSInAppWebViewController extends PlatformInAppWebViewController String urlIcon, String? rel, String? sizes, bool isManifest) { List favicons = []; - List urlSplitted = urlIcon.split("/"); + List urlSplit = urlIcon.split("/"); if (!_isUrlAbsolute(urlIcon)) { if (urlIcon.startsWith("/")) { urlIcon = urlIcon.substring(1); @@ -1754,15 +1754,15 @@ class MacOSInAppWebViewController extends PlatformInAppWebViewController } if (isManifest) { rel = (sizes != null) - ? urlSplitted[urlSplitted.length - 1] + ? urlSplit[urlSplit.length - 1] .replaceFirst("-" + sizes, "") .split(" ")[0] .split(".")[0] : null; } if (sizes != null && sizes.isNotEmpty && sizes != "any") { - List sizesSplitted = sizes.split(" "); - for (String size in sizesSplitted) { + List sizesSplit = sizes.split(" "); + for (String size in sizesSplit) { int width = int.parse(size.split("x")[0]); int height = int.parse(size.split("x")[1]); favicons.add(Favicon( diff --git a/flutter_inappwebview_macos/macos/Classes/InAppBrowser/InAppBrowserWebViewController.swift b/flutter_inappwebview_macos/macos/Classes/InAppBrowser/InAppBrowserWebViewController.swift index 631a3266..48b16e93 100755 --- a/flutter_inappwebview_macos/macos/Classes/InAppBrowser/InAppBrowserWebViewController.swift +++ b/flutter_inappwebview_macos/macos/Classes/InAppBrowser/InAppBrowserWebViewController.swift @@ -41,8 +41,8 @@ public class InAppBrowserWebViewController: NSViewController, InAppBrowserDelega channelDelegate = InAppBrowserChannelDelegate(channel: channel) var userScripts: [UserScript] = [] - for intialUserScript in initialUserScripts { - userScripts.append(UserScript.fromMap(map: intialUserScript, windowId: windowId)!) + for initialUserScript in initialUserScripts { + userScripts.append(UserScript.fromMap(map: initialUserScript, windowId: windowId)!) } let preWebviewConfiguration = InAppWebView.preWKWebViewConfiguration(settings: webViewSettings) diff --git a/flutter_inappwebview_macos/macos/Classes/InAppWebView/CustomSchemeHandler.swift b/flutter_inappwebview_macos/macos/Classes/InAppWebView/CustomSchemeHandler.swift index a8df969e..d4119f34 100755 --- a/flutter_inappwebview_macos/macos/Classes/InAppWebView/CustomSchemeHandler.swift +++ b/flutter_inappwebview_macos/macos/Classes/InAppWebView/CustomSchemeHandler.swift @@ -1,5 +1,5 @@ // -// CustomeSchemeHandler.swift +// CustomSchemeHandler.swift // flutter_inappwebview // // Created by Lorenzo Pichilli on 25/10/2019. diff --git a/flutter_inappwebview_macos/macos/Classes/InAppWebView/FlutterWebViewController.swift b/flutter_inappwebview_macos/macos/Classes/InAppWebView/FlutterWebViewController.swift index 147b5c1a..9cae7114 100755 --- a/flutter_inappwebview_macos/macos/Classes/InAppWebView/FlutterWebViewController.swift +++ b/flutter_inappwebview_macos/macos/Classes/InAppWebView/FlutterWebViewController.swift @@ -27,8 +27,8 @@ public class FlutterWebViewController: NSObject, /*FlutterPlatformView,*/ Dispos var userScripts: [UserScript] = [] if let initialUserScripts = initialUserScripts { - for intialUserScript in initialUserScripts { - userScripts.append(UserScript.fromMap(map: intialUserScript, windowId: windowId)!) + for initialUserScript in initialUserScripts { + userScripts.append(UserScript.fromMap(map: initialUserScript, windowId: windowId)!) } } diff --git a/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift b/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift index 8bb5a4f0..d6aed683 100755 --- a/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift +++ b/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift @@ -1365,7 +1365,7 @@ public class InAppWebView: WKWebView, WKUIDelegate, switch action { case 0: InAppWebView.credentialsProposed = [] - // used .performDefaultHandling to mantain consistency with Android + // used .performDefaultHandling to maintain consistency with Android // because .cancelAuthenticationChallenge will call webView(_:didFail:withError:) completionHandler(.performDefaultHandling, nil) //completionHandler(.cancelAuthenticationChallenge, nil) diff --git a/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebViewManager.swift b/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebViewManager.swift index a9ebe4e4..1afc4fe8 100755 --- a/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebViewManager.swift +++ b/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebViewManager.swift @@ -63,7 +63,7 @@ public class InAppWebViewManager: ChannelDelegate { webViewForUserAgent?.evaluateJavaScript("navigator.userAgent") { (value, error) in if error != nil { - print("Error occured to get userAgent") + print("Error occurred to get userAgent") self.webViewForUserAgent = nil completionHandler(nil) return diff --git a/flutter_inappwebview_macos/macos/Classes/PluginScriptsJS/FindTextHighlightJS.swift b/flutter_inappwebview_macos/macos/Classes/PluginScriptsJS/FindTextHighlightJS.swift index a61a05b7..f0db6145 100644 --- a/flutter_inappwebview_macos/macos/Classes/PluginScriptsJS/FindTextHighlightJS.swift +++ b/flutter_inappwebview_macos/macos/Classes/PluginScriptsJS/FindTextHighlightJS.swift @@ -111,7 +111,7 @@ window.\(JAVASCRIPT_BRIDGE_NAME)._findAllAsync = function(keyword) { ); } -// helper function, recursively removes the highlights in elements and their childs +// helper function, recursively removes the highlights in elements and their children window.\(JAVASCRIPT_BRIDGE_NAME)._clearMatchesForElement = function(element) { if (element) { if (element.nodeType == 1) { diff --git a/flutter_inappwebview_macos/macos/Classes/Types/URLProtectionSpace.swift b/flutter_inappwebview_macos/macos/Classes/Types/URLProtectionSpace.swift index 75557e17..3d6b9022 100644 --- a/flutter_inappwebview_macos/macos/Classes/Types/URLProtectionSpace.swift +++ b/flutter_inappwebview_macos/macos/Classes/Types/URLProtectionSpace.swift @@ -49,7 +49,7 @@ extension URLProtectionSpace { public func toMap () -> [String:Any?] { return [ "host": host, - "procotol": self.protocol, + "protocol": self.protocol, "realm": realm, "port": port, "sslCertificate": sslCertificate?.toMap(), diff --git a/flutter_inappwebview_macos/macos/Classes/Util.swift b/flutter_inappwebview_macos/macos/Classes/Util.swift index bd29316a..bf9d91cc 100644 --- a/flutter_inappwebview_macos/macos/Classes/Util.swift +++ b/flutter_inappwebview_macos/macos/Classes/Util.swift @@ -106,10 +106,10 @@ public class Util { } if let ipv4Range = Range(match.range(at: 2), in: address) { let ipv4 = address[ipv4Range] - let ipv4Splitted = ipv4.split(separator: ".") + let ipv4Split = ipv4.split(separator: ".") var ipv4Converted = Array(repeating: "0000", count: 4) for i in 0...3 { - let byte = Int(ipv4Splitted[i])! + let byte = Int(ipv4Split[i])! let hex = ("0" + String(byte, radix: 16)) var offset = hex.count - 3 offset = offset < 0 ? 0 : offset diff --git a/flutter_inappwebview_platform_interface/lib/src/types/console_message.dart b/flutter_inappwebview_platform_interface/lib/src/types/console_message.dart index 28bc11a5..a21980b8 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/console_message.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/console_message.dart @@ -14,7 +14,7 @@ class ConsoleMessage_ { ///Console message String message; - ///Console messsage level + ///Console message level ConsoleMessageLevel_ messageLevel; ConsoleMessage_( diff --git a/flutter_inappwebview_platform_interface/lib/src/types/console_message.g.dart b/flutter_inappwebview_platform_interface/lib/src/types/console_message.g.dart index 30ac55e3..cf119211 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/console_message.g.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/console_message.g.dart @@ -14,7 +14,7 @@ class ConsoleMessage { ///Console message String message; - ///Console messsage level + ///Console message level ConsoleMessageLevel messageLevel; ConsoleMessage( {this.message = "", this.messageLevel = ConsoleMessageLevel.LOG}); diff --git a/flutter_inappwebview_web/lib/src/in_app_webview/in_app_webview_controller.dart b/flutter_inappwebview_web/lib/src/in_app_webview/in_app_webview_controller.dart index a98faeb8..7a824fad 100644 --- a/flutter_inappwebview_web/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/flutter_inappwebview_web/lib/src/in_app_webview/in_app_webview_controller.dart @@ -261,8 +261,8 @@ class WebPlatformInAppWebViewController extends PlatformInAppWebViewController } if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - var assetPath = assetPathSplitted[assetPathSplitted.length - 1]; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + var assetPath = assetPathSplit[assetPathSplit.length - 1]; try { var bytes = await rootBundle.load(assetPath); html = utf8.decode(bytes.buffer.asUint8List()); @@ -291,8 +291,8 @@ class WebPlatformInAppWebViewController extends PlatformInAppWebViewController var assetPathBase; if (webviewUrl.isScheme("file")) { - var assetPathSplitted = webviewUrl.toString().split("/flutter_assets/"); - assetPathBase = assetPathSplitted[0] + "/flutter_assets/"; + var assetPathSplit = webviewUrl.toString().split("/flutter_assets/"); + assetPathBase = assetPathSplit[0] + "/flutter_assets/"; } InAppWebViewSettings? settings = await getSettings(); @@ -354,7 +354,7 @@ class WebPlatformInAppWebViewController extends PlatformInAppWebViewController String urlIcon, String? rel, String? sizes, bool isManifest) { List favicons = []; - List urlSplitted = urlIcon.split("/"); + List urlSplit = urlIcon.split("/"); if (!_isUrlAbsolute(urlIcon)) { if (urlIcon.startsWith("/")) { urlIcon = urlIcon.substring(1); @@ -366,15 +366,15 @@ class WebPlatformInAppWebViewController extends PlatformInAppWebViewController } if (isManifest) { rel = (sizes != null) - ? urlSplitted[urlSplitted.length - 1] + ? urlSplit[urlSplit.length - 1] .replaceFirst("-" + sizes, "") .split(" ")[0] .split(".")[0] : null; } if (sizes != null && sizes.isNotEmpty && sizes != "any") { - List sizesSplitted = sizes.split(" "); - for (String size in sizesSplitted) { + List sizesSplit = sizes.split(" "); + for (String size in sizesSplit) { int width = int.parse(size.split("x")[0]); int height = int.parse(size.split("x")[1]); favicons.add(Favicon(