Skip to content

Commit 062d425

Browse files
committed
Swift format
1 parent f56d303 commit 062d425

File tree

3 files changed

+29
-22
lines changed

3 files changed

+29
-22
lines changed

packages/webview_flutter/webview_flutter_wkwebview/darwin/Tests/NavigationDelegateProxyAPITests.swift

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,12 @@ class TestNavigationDelegateApi: PigeonApiProtocolWKNavigationDelegate {
170170
func decidePolicyForNavigationAction(
171171
pigeonInstance pigeonInstanceArg: WKNavigationDelegate, webView webViewArg: WKWebView,
172172
navigationAction navigationActionArg: WKNavigationAction,
173-
completion: @escaping (
174-
Result<
175-
webview_flutter_wkwebview.NavigationActionPolicy, webview_flutter_wkwebview.PigeonError
176-
>
177-
) -> Void
173+
completion:
174+
@escaping (
175+
Result<
176+
webview_flutter_wkwebview.NavigationActionPolicy, webview_flutter_wkwebview.PigeonError
177+
>
178+
) -> Void
178179
) {
179180
decidePolicyForNavigationActionArgs = [webViewArg, navigationActionArg]
180181
completion(.success(.allow))
@@ -183,11 +184,12 @@ class TestNavigationDelegateApi: PigeonApiProtocolWKNavigationDelegate {
183184
func decidePolicyForNavigationResponse(
184185
pigeonInstance pigeonInstanceArg: WKNavigationDelegate, webView webViewArg: WKWebView,
185186
navigationResponse navigationResponseArg: WKNavigationResponse,
186-
completion: @escaping (
187-
Result<
188-
webview_flutter_wkwebview.NavigationResponsePolicy, webview_flutter_wkwebview.PigeonError
189-
>
190-
) -> Void
187+
completion:
188+
@escaping (
189+
Result<
190+
webview_flutter_wkwebview.NavigationResponsePolicy, webview_flutter_wkwebview.PigeonError
191+
>
192+
) -> Void
191193
) {
192194
decidePolicyForNavigationResponseArgs = [webViewArg, navigationResponseArg]
193195
completion(.success(.cancel))
@@ -219,12 +221,13 @@ class TestNavigationDelegateApi: PigeonApiProtocolWKNavigationDelegate {
219221
func didReceiveAuthenticationChallenge(
220222
pigeonInstance pigeonInstanceArg: WKNavigationDelegate, webView webViewArg: WKWebView,
221223
challenge challengeArg: URLAuthenticationChallenge,
222-
completion: @escaping (
223-
Result<
224-
webview_flutter_wkwebview.AuthenticationChallengeResponse,
225-
webview_flutter_wkwebview.PigeonError
226-
>
227-
) -> Void
224+
completion:
225+
@escaping (
226+
Result<
227+
webview_flutter_wkwebview.AuthenticationChallengeResponse,
228+
webview_flutter_wkwebview.PigeonError
229+
>
230+
) -> Void
228231
) {
229232
didReceiveAuthenticationChallengeArgs = [webViewArg, challengeArg]
230233
completion(
@@ -241,7 +244,8 @@ class TestWebView: WKWebView {
241244
}
242245
}
243246

244-
class TestURLAuthenticationChallengeSender: NSObject, URLAuthenticationChallengeSender, @unchecked
247+
class TestURLAuthenticationChallengeSender: NSObject, URLAuthenticationChallengeSender,
248+
@unchecked
245249
Sendable
246250
{
247251
func use(_ credential: URLCredential, for challenge: URLAuthenticationChallenge) {

packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/NavigationDelegateProxyAPIDelegate.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ public class NavigationDelegateImpl: NSObject, WKNavigationDelegate {
233233
#if compiler(>=6.0)
234234
public func webView(
235235
_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge,
236-
completionHandler: @escaping @MainActor (URLSession.AuthChallengeDisposition, URLCredential?)
236+
completionHandler:
237+
@escaping @MainActor (URLSession.AuthChallengeDisposition, URLCredential?)
237238
->
238239
Void
239240
) {
@@ -256,7 +257,8 @@ public class NavigationDelegateImpl: NSObject, WKNavigationDelegate {
256257
#else
257258
public func webView(
258259
_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge,
259-
completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) ->
260+
completionHandler:
261+
@escaping (URLSession.AuthChallengeDisposition, URLCredential?) ->
260262
Void
261263
) {
262264
registrar.dispatchOnMainThread { onFailure in

packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/ProxyAPIRegistrar.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ open class ProxyAPIRegistrar: WebKitLibraryPigeonProxyApiRegistrar {
7878

7979
/// Handles calling a Flutter method on the main thread.
8080
func dispatchOnMainThread(
81-
execute work: @escaping (
82-
_ onFailure: @escaping (_ methodName: String, _ error: PigeonError) -> Void
83-
) -> Void
81+
execute work:
82+
@escaping (
83+
_ onFailure: @escaping (_ methodName: String, _ error: PigeonError) -> Void
84+
) -> Void
8485
) {
8586
DispatchQueue.main.async {
8687
work { methodName, error in

0 commit comments

Comments
 (0)