diff --git a/lib/src/chrome_safari_browser/chrome_safari_browser.dart b/lib/src/chrome_safari_browser/chrome_safari_browser.dart index e4f636ba..4f2e94a9 100755 --- a/lib/src/chrome_safari_browser/chrome_safari_browser.dart +++ b/lib/src/chrome_safari_browser/chrome_safari_browser.dart @@ -295,7 +295,8 @@ class ChromeSafariBrowser extends ChannelController { Map args = {}; args.putIfAbsent('relation', () => relation.toNativeValue()); args.putIfAbsent('origin', () => origin.toString()); - return await channel?.invokeMethod("validateRelationship", args) ?? false; + return await channel?.invokeMethod("validateRelationship", args) ?? + false; } ///Closes the [ChromeSafariBrowser] instance. @@ -401,7 +402,8 @@ class ChromeSafariBrowser extends ChannelController { ///- Android static Future getMaxToolbarItems() async { Map args = {}; - return await _sharedChannel.invokeMethod("getMaxToolbarItems", args) ?? 0; + return await _sharedChannel.invokeMethod("getMaxToolbarItems", args) ?? + 0; } ///Clear associated website data accrued from browsing activity within your app. diff --git a/lib/src/cookie_manager.dart b/lib/src/cookie_manager.dart index 65f35142..e33856e4 100755 --- a/lib/src/cookie_manager.dart +++ b/lib/src/cookie_manager.dart @@ -92,7 +92,7 @@ class CookieManager { bool? isHttpOnly, HTTPCookieSameSitePolicy? sameSite, @Deprecated("Use webViewController instead") - InAppWebViewController? iosBelow11WebViewController, + InAppWebViewController? iosBelow11WebViewController, InAppWebViewController? webViewController}) async { webViewController = webViewController ?? iosBelow11WebViewController; @@ -204,7 +204,7 @@ class CookieManager { Future> getCookies( {required WebUri url, @Deprecated("Use webViewController instead") - InAppWebViewController? iosBelow11WebViewController, + InAppWebViewController? iosBelow11WebViewController, InAppWebViewController? webViewController}) async { assert(url.toString().isNotEmpty); @@ -318,7 +318,7 @@ class CookieManager { {required WebUri url, required String name, @Deprecated("Use webViewController instead") - InAppWebViewController? iosBelow11WebViewController, + InAppWebViewController? iosBelow11WebViewController, InAppWebViewController? webViewController}) async { assert(url.toString().isNotEmpty); assert(name.isNotEmpty); @@ -381,7 +381,7 @@ class CookieManager { String path = "/", String? domain, @Deprecated("Use webViewController instead") - InAppWebViewController? iosBelow11WebViewController, + InAppWebViewController? iosBelow11WebViewController, InAppWebViewController? webViewController}) async { assert(url.toString().isNotEmpty); assert(name.isNotEmpty); @@ -433,7 +433,7 @@ class CookieManager { String path = "/", String? domain, @Deprecated("Use webViewController instead") - InAppWebViewController? iosBelow11WebViewController, + InAppWebViewController? iosBelow11WebViewController, InAppWebViewController? webViewController}) async { assert(url.toString().isNotEmpty); diff --git a/lib/src/in_app_browser/in_app_browser.dart b/lib/src/in_app_browser/in_app_browser.dart index f54ebc78..9e0bbe1d 100755 --- a/lib/src/in_app_browser/in_app_browser.dart +++ b/lib/src/in_app_browser/in_app_browser.dart @@ -70,8 +70,7 @@ class InAppBrowser extends ChannelController { } _init() { - channel = - MethodChannel('com.pichillilorenzo/flutter_inappbrowser_$id'); + channel = MethodChannel('com.pichillilorenzo/flutter_inappbrowser_$id'); handler = _handleMethod; initMethodCallHandler(); diff --git a/lib/src/in_app_localhost_server.dart b/lib/src/in_app_localhost_server.dart index 8e20961d..00485dca 100755 --- a/lib/src/in_app_localhost_server.dart +++ b/lib/src/in_app_localhost_server.dart @@ -86,7 +86,9 @@ class InAppLocalhostServer { path = _documentRoot + path; try { - body = (await rootBundle.load(Uri.decodeFull(path))).buffer.asUint8List(); + body = (await rootBundle.load(Uri.decodeFull(path))) + .buffer + .asUint8List(); } catch (e) { print(e.toString()); request.response.close(); diff --git a/lib/src/in_app_webview/apple/in_app_webview_controller.dart b/lib/src/in_app_webview/apple/in_app_webview_controller.dart index 0934606d..5e2eab3e 100644 --- a/lib/src/in_app_webview/apple/in_app_webview_controller.dart +++ b/lib/src/in_app_webview/apple/in_app_webview_controller.dart @@ -26,8 +26,8 @@ class IOSInAppWebViewController { @Deprecated("Use InAppWebViewController.createPdf instead") Future createPdf( {@Deprecated("Use pdfConfiguration instead") - // ignore: deprecated_member_use_from_same_package - IOSWKPDFConfiguration? iosWKPdfConfiguration, + // ignore: deprecated_member_use_from_same_package + IOSWKPDFConfiguration? iosWKPdfConfiguration, PDFConfiguration? pdfConfiguration}) async { Map args = {}; args.putIfAbsent('pdfConfiguration', diff --git a/lib/src/in_app_webview/headless_in_app_webview.dart b/lib/src/in_app_webview/headless_in_app_webview.dart index 310a83dc..0706eeda 100644 --- a/lib/src/in_app_webview/headless_in_app_webview.dart +++ b/lib/src/in_app_webview/headless_in_app_webview.dart @@ -29,7 +29,8 @@ import '../types/disposable.dart'; ///- Web ///- MacOS ///{@endtemplate} -class HeadlessInAppWebView extends ChannelController implements WebView, Disposable { +class HeadlessInAppWebView extends ChannelController + implements WebView, Disposable { ///View ID. late final String id; @@ -68,8 +69,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa this.initialUrlRequest, this.initialFile, this.initialData, - @Deprecated('Use initialSettings instead') - this.initialOptions, + @Deprecated('Use initialSettings instead') this.initialOptions, this.initialSettings, this.contextMenu, this.initialUserScripts, @@ -78,22 +78,19 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa this.onWebViewCreated, this.onLoadStart, this.onLoadStop, - @Deprecated("Use onReceivedError instead") - this.onLoadError, + @Deprecated("Use onReceivedError instead") this.onLoadError, this.onReceivedError, - @Deprecated("Use onReceivedHttpError instead") - this.onLoadHttpError, + @Deprecated("Use onReceivedHttpError instead") this.onLoadHttpError, this.onReceivedHttpError, this.onProgressChanged, this.onConsoleMessage, this.shouldOverrideUrlLoading, this.onLoadResource, this.onScrollChanged, - @Deprecated('Use onDownloadStartRequest instead') - this.onDownloadStart, + @Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart, this.onDownloadStartRequest, @Deprecated('Use onLoadResourceWithCustomScheme instead') - this.onLoadResourceCustomScheme, + this.onLoadResourceCustomScheme, this.onLoadResourceWithCustomScheme, this.onCreateWindow, this.onCloseWindow, @@ -104,14 +101,13 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa this.onReceivedServerTrustAuthRequest, this.onReceivedClientCertRequest, @Deprecated('Use FindInteractionController.onFindResultReceived instead') - this.onFindResultReceived, + this.onFindResultReceived, this.shouldInterceptAjaxRequest, this.onAjaxReadyStateChange, this.onAjaxProgress, this.shouldInterceptFetchRequest, this.onUpdateVisitedHistory, - @Deprecated("Use onPrintRequest instead") - this.onPrint, + @Deprecated("Use onPrintRequest instead") this.onPrint, this.onPrintRequest, this.onLongPressHitTestResult, this.onEnterFullscreen, @@ -122,59 +118,57 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa this.onWindowBlur, this.onOverScrolled, @Deprecated('Use onSafeBrowsingHit instead') - this.androidOnSafeBrowsingHit, + this.androidOnSafeBrowsingHit, this.onSafeBrowsingHit, @Deprecated('Use onPermissionRequest instead') - this.androidOnPermissionRequest, + this.androidOnPermissionRequest, this.onPermissionRequest, @Deprecated('Use onGeolocationPermissionsShowPrompt instead') - this.androidOnGeolocationPermissionsShowPrompt, + this.androidOnGeolocationPermissionsShowPrompt, this.onGeolocationPermissionsShowPrompt, @Deprecated('Use onGeolocationPermissionsHidePrompt instead') - this.androidOnGeolocationPermissionsHidePrompt, + this.androidOnGeolocationPermissionsHidePrompt, this.onGeolocationPermissionsHidePrompt, @Deprecated('Use shouldInterceptRequest instead') - this.androidShouldInterceptRequest, + this.androidShouldInterceptRequest, this.shouldInterceptRequest, @Deprecated('Use onRenderProcessGone instead') - this.androidOnRenderProcessGone, + this.androidOnRenderProcessGone, this.onRenderProcessGone, @Deprecated('Use onRenderProcessResponsive instead') - this.androidOnRenderProcessResponsive, + this.androidOnRenderProcessResponsive, this.onRenderProcessResponsive, @Deprecated('Use onRenderProcessUnresponsive instead') - this.androidOnRenderProcessUnresponsive, + this.androidOnRenderProcessUnresponsive, this.onRenderProcessUnresponsive, @Deprecated('Use onFormResubmission instead') - this.androidOnFormResubmission, + this.androidOnFormResubmission, this.onFormResubmission, - @Deprecated('Use onZoomScaleChanged instead') - this.androidOnScaleChanged, - @Deprecated('Use onReceivedIcon instead') - this.androidOnReceivedIcon, + @Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged, + @Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon, this.onReceivedIcon, @Deprecated('Use onReceivedTouchIconUrl instead') - this.androidOnReceivedTouchIconUrl, + this.androidOnReceivedTouchIconUrl, this.onReceivedTouchIconUrl, - @Deprecated('Use onJsBeforeUnload instead') - this.androidOnJsBeforeUnload, + @Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload, this.onJsBeforeUnload, @Deprecated('Use onReceivedLoginRequest instead') - this.androidOnReceivedLoginRequest, + this.androidOnReceivedLoginRequest, this.onReceivedLoginRequest, this.onPermissionRequestCanceled, this.onRequestFocus, @Deprecated('Use onWebContentProcessDidTerminate instead') - this.iosOnWebContentProcessDidTerminate, + this.iosOnWebContentProcessDidTerminate, this.onWebContentProcessDidTerminate, - @Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') - this.iosOnDidReceiveServerRedirectForProvisionalNavigation, + @Deprecated( + 'Use onDidReceiveServerRedirectForProvisionalNavigation instead') + this.iosOnDidReceiveServerRedirectForProvisionalNavigation, this.onDidReceiveServerRedirectForProvisionalNavigation, @Deprecated('Use onNavigationResponse instead') - this.iosOnNavigationResponse, + this.iosOnNavigationResponse, this.onNavigationResponse, @Deprecated('Use shouldAllowDeprecatedTLS instead') - this.iosShouldAllowDeprecatedTLS, + this.iosShouldAllowDeprecatedTLS, this.shouldAllowDeprecatedTLS, this.onCameraCaptureStateChanged, this.onMicrophoneCaptureStateChanged, @@ -364,8 +358,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa Map args = {}; Map sizeMap = - (await channel?.invokeMethod('getSize', args)) - ?.cast(); + (await channel?.invokeMethod('getSize', args))?.cast(); return MapSize.fromMap(sizeMap); } diff --git a/lib/src/in_app_webview/in_app_webview.dart b/lib/src/in_app_webview/in_app_webview.dart index 9859c4c5..237dbda9 100755 --- a/lib/src/in_app_webview/in_app_webview.dart +++ b/lib/src/in_app_webview/in_app_webview.dart @@ -101,7 +101,7 @@ class InAppWebView extends StatefulWidget implements WebView { @Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart, this.onDownloadStartRequest, @Deprecated('Use onLoadResourceWithCustomScheme instead') - this.onLoadResourceCustomScheme, + this.onLoadResourceCustomScheme, this.onLoadResourceWithCustomScheme, this.onCreateWindow, this.onCloseWindow, @@ -112,7 +112,7 @@ class InAppWebView extends StatefulWidget implements WebView { this.onReceivedServerTrustAuthRequest, this.onReceivedClientCertRequest, @Deprecated('Use FindInteractionController.onFindResultReceived instead') - this.onFindResultReceived, + this.onFindResultReceived, this.shouldInterceptAjaxRequest, this.onAjaxReadyStateChange, this.onAjaxProgress, @@ -132,53 +132,54 @@ class InAppWebView extends StatefulWidget implements WebView { @Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit, this.onSafeBrowsingHit, @Deprecated('Use onPermissionRequest instead') - this.androidOnPermissionRequest, + this.androidOnPermissionRequest, this.onPermissionRequest, @Deprecated('Use onGeolocationPermissionsShowPrompt instead') - this.androidOnGeolocationPermissionsShowPrompt, + this.androidOnGeolocationPermissionsShowPrompt, this.onGeolocationPermissionsShowPrompt, @Deprecated('Use onGeolocationPermissionsHidePrompt instead') - this.androidOnGeolocationPermissionsHidePrompt, + this.androidOnGeolocationPermissionsHidePrompt, this.onGeolocationPermissionsHidePrompt, @Deprecated('Use shouldInterceptRequest instead') - this.androidShouldInterceptRequest, + this.androidShouldInterceptRequest, this.shouldInterceptRequest, @Deprecated('Use onRenderProcessGone instead') - this.androidOnRenderProcessGone, + this.androidOnRenderProcessGone, this.onRenderProcessGone, @Deprecated('Use onRenderProcessResponsive instead') - this.androidOnRenderProcessResponsive, + this.androidOnRenderProcessResponsive, this.onRenderProcessResponsive, @Deprecated('Use onRenderProcessUnresponsive instead') - this.androidOnRenderProcessUnresponsive, + this.androidOnRenderProcessUnresponsive, this.onRenderProcessUnresponsive, @Deprecated('Use onFormResubmission instead') - this.androidOnFormResubmission, + this.androidOnFormResubmission, this.onFormResubmission, @Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged, @Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon, this.onReceivedIcon, @Deprecated('Use onReceivedTouchIconUrl instead') - this.androidOnReceivedTouchIconUrl, + this.androidOnReceivedTouchIconUrl, this.onReceivedTouchIconUrl, @Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload, this.onJsBeforeUnload, @Deprecated('Use onReceivedLoginRequest instead') - this.androidOnReceivedLoginRequest, + this.androidOnReceivedLoginRequest, this.onReceivedLoginRequest, this.onPermissionRequestCanceled, this.onRequestFocus, @Deprecated('Use onWebContentProcessDidTerminate instead') - this.iosOnWebContentProcessDidTerminate, + this.iosOnWebContentProcessDidTerminate, this.onWebContentProcessDidTerminate, - @Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') - this.iosOnDidReceiveServerRedirectForProvisionalNavigation, + @Deprecated( + 'Use onDidReceiveServerRedirectForProvisionalNavigation instead') + this.iosOnDidReceiveServerRedirectForProvisionalNavigation, this.onDidReceiveServerRedirectForProvisionalNavigation, @Deprecated('Use onNavigationResponse instead') - this.iosOnNavigationResponse, + this.iosOnNavigationResponse, this.onNavigationResponse, @Deprecated('Use shouldAllowDeprecatedTLS instead') - this.iosShouldAllowDeprecatedTLS, + this.iosShouldAllowDeprecatedTLS, this.shouldAllowDeprecatedTLS, this.onCameraCaptureStateChanged, this.onMicrophoneCaptureStateChanged, diff --git a/lib/src/in_app_webview/webview.dart b/lib/src/in_app_webview/webview.dart index 45df9407..65ba1522 100644 --- a/lib/src/in_app_webview/webview.dart +++ b/lib/src/in_app_webview/webview.dart @@ -1197,22 +1197,19 @@ abstract class WebView { this.onWebViewCreated, this.onLoadStart, this.onLoadStop, - @Deprecated('Use onReceivedError instead') - this.onLoadError, + @Deprecated('Use onReceivedError instead') this.onLoadError, this.onReceivedError, - @Deprecated("Use onReceivedHttpError instead") - this.onLoadHttpError, + @Deprecated("Use onReceivedHttpError instead") this.onLoadHttpError, this.onReceivedHttpError, this.onProgressChanged, this.onConsoleMessage, this.shouldOverrideUrlLoading, this.onLoadResource, this.onScrollChanged, - @Deprecated('Use onDownloadStartRequest instead') - this.onDownloadStart, + @Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart, this.onDownloadStartRequest, @Deprecated('Use onLoadResourceWithCustomScheme instead') - this.onLoadResourceCustomScheme, + this.onLoadResourceCustomScheme, this.onLoadResourceWithCustomScheme, this.onCreateWindow, this.onCloseWindow, @@ -1223,14 +1220,13 @@ abstract class WebView { this.onReceivedServerTrustAuthRequest, this.onReceivedClientCertRequest, @Deprecated('Use FindInteractionController.onFindResultReceived instead') - this.onFindResultReceived, + this.onFindResultReceived, this.shouldInterceptAjaxRequest, this.onAjaxReadyStateChange, this.onAjaxProgress, this.shouldInterceptFetchRequest, this.onUpdateVisitedHistory, - @Deprecated("Use onPrintRequest instead") - this.onPrint, + @Deprecated("Use onPrintRequest instead") this.onPrint, this.onPrintRequest, this.onLongPressHitTestResult, this.onEnterFullscreen, @@ -1242,59 +1238,57 @@ abstract class WebView { this.onOverScrolled, this.onZoomScaleChanged, @Deprecated('Use onSafeBrowsingHit instead') - this.androidOnSafeBrowsingHit, + this.androidOnSafeBrowsingHit, this.onSafeBrowsingHit, @Deprecated('Use onPermissionRequest instead') - this.androidOnPermissionRequest, + this.androidOnPermissionRequest, this.onPermissionRequest, @Deprecated('Use onGeolocationPermissionsShowPrompt instead') - this.androidOnGeolocationPermissionsShowPrompt, + this.androidOnGeolocationPermissionsShowPrompt, this.onGeolocationPermissionsShowPrompt, @Deprecated('Use onGeolocationPermissionsHidePrompt instead') - this.androidOnGeolocationPermissionsHidePrompt, + this.androidOnGeolocationPermissionsHidePrompt, this.onGeolocationPermissionsHidePrompt, @Deprecated('Use shouldInterceptRequest instead') - this.androidShouldInterceptRequest, + this.androidShouldInterceptRequest, this.shouldInterceptRequest, @Deprecated('Use onRenderProcessGone instead') - this.androidOnRenderProcessGone, + this.androidOnRenderProcessGone, this.onRenderProcessGone, @Deprecated('Use onRenderProcessResponsive instead') - this.androidOnRenderProcessResponsive, + this.androidOnRenderProcessResponsive, this.onRenderProcessResponsive, @Deprecated('Use onRenderProcessUnresponsive instead') - this.androidOnRenderProcessUnresponsive, + this.androidOnRenderProcessUnresponsive, this.onRenderProcessUnresponsive, @Deprecated('Use onFormResubmission instead') - this.androidOnFormResubmission, + this.androidOnFormResubmission, this.onFormResubmission, - @Deprecated('Use onZoomScaleChanged instead') - this.androidOnScaleChanged, - @Deprecated('Use onReceivedIcon instead') - this.androidOnReceivedIcon, + @Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged, + @Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon, this.onReceivedIcon, @Deprecated('Use onReceivedTouchIconUrl instead') - this.androidOnReceivedTouchIconUrl, + this.androidOnReceivedTouchIconUrl, this.onReceivedTouchIconUrl, - @Deprecated('Use onJsBeforeUnload instead') - this.androidOnJsBeforeUnload, + @Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload, this.onJsBeforeUnload, @Deprecated('Use onReceivedLoginRequest instead') - this.androidOnReceivedLoginRequest, + this.androidOnReceivedLoginRequest, this.onReceivedLoginRequest, this.onPermissionRequestCanceled, this.onRequestFocus, @Deprecated('Use onWebContentProcessDidTerminate instead') - this.iosOnWebContentProcessDidTerminate, + this.iosOnWebContentProcessDidTerminate, this.onWebContentProcessDidTerminate, - @Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') - this.iosOnDidReceiveServerRedirectForProvisionalNavigation, + @Deprecated( + 'Use onDidReceiveServerRedirectForProvisionalNavigation instead') + this.iosOnDidReceiveServerRedirectForProvisionalNavigation, this.onDidReceiveServerRedirectForProvisionalNavigation, @Deprecated('Use onNavigationResponse instead') - this.iosOnNavigationResponse, + this.iosOnNavigationResponse, this.onNavigationResponse, @Deprecated('Use shouldAllowDeprecatedTLS instead') - this.iosShouldAllowDeprecatedTLS, + this.iosShouldAllowDeprecatedTLS, this.shouldAllowDeprecatedTLS, this.onCameraCaptureStateChanged, this.onMicrophoneCaptureStateChanged, @@ -1302,8 +1296,7 @@ abstract class WebView { this.initialUrlRequest, this.initialFile, this.initialData, - @Deprecated('Use initialSettings instead') - this.initialOptions, + @Deprecated('Use initialSettings instead') this.initialOptions, this.initialSettings, this.contextMenu, this.initialUserScripts, diff --git a/lib/src/print_job/print_job_controller.dart b/lib/src/print_job/print_job_controller.dart index 8c8feb5f..4aca7391 100644 --- a/lib/src/print_job/print_job_controller.dart +++ b/lib/src/print_job/print_job_controller.dart @@ -93,8 +93,7 @@ class PrintJobController extends ChannelController { Future getInfo() async { Map args = {}; Map? infoMap = - (await channel?.invokeMethod('getInfo', args)) - ?.cast(); + (await channel?.invokeMethod('getInfo', args))?.cast(); return PrintJobInfo.fromMap(infoMap); } diff --git a/lib/src/pull_to_refresh/pull_to_refresh_controller.dart b/lib/src/pull_to_refresh/pull_to_refresh_controller.dart index 1d08c061..8f5201d6 100644 --- a/lib/src/pull_to_refresh/pull_to_refresh_controller.dart +++ b/lib/src/pull_to_refresh/pull_to_refresh_controller.dart @@ -176,7 +176,9 @@ class PullToRefreshController extends ChannelController { ///- Android native WebView ([Official API - SwipeRefreshLayout.DEFAULT_SLINGSHOT_DISTANCE](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#DEFAULT_SLINGSHOT_DISTANCE())) Future getDefaultSlingshotDistance() async { Map args = {}; - return await channel?.invokeMethod('getDefaultSlingshotDistance', args) ?? 0; + return await channel?.invokeMethod( + 'getDefaultSlingshotDistance', args) ?? + 0; } ///Use [setIndicatorSize] instead. diff --git a/lib/src/types/client_cert_response.dart b/lib/src/types/client_cert_response.dart index 0281b3c1..1b8d64c4 100644 --- a/lib/src/types/client_cert_response.dart +++ b/lib/src/types/client_cert_response.dart @@ -33,7 +33,7 @@ class ClientCertResponse_ { {required this.certificatePath, this.certificatePassword = "", @Deprecated('Use keyStoreType instead') - this.androidKeyStoreType = "PKCS12", + this.androidKeyStoreType = "PKCS12", this.keyStoreType = "PKCS12", this.action = ClientCertResponseAction_.CANCEL}) { if (this.action == ClientCertResponseAction_.PROCEED) diff --git a/lib/src/types/client_cert_response.g.dart b/lib/src/types/client_cert_response.g.dart index 37cf378d..2f009444 100644 --- a/lib/src/types/client_cert_response.g.dart +++ b/lib/src/types/client_cert_response.g.dart @@ -30,7 +30,7 @@ class ClientCertResponse { {required this.certificatePath, this.certificatePassword = "", @Deprecated('Use keyStoreType instead') - this.androidKeyStoreType = "PKCS12", + this.androidKeyStoreType = "PKCS12", this.keyStoreType = "PKCS12", this.action = ClientCertResponseAction.CANCEL}) { if (this.action == ClientCertResponseAction.PROCEED) diff --git a/lib/src/types/create_window_action.dart b/lib/src/types/create_window_action.dart index 7454d84c..c8f4c0e3 100644 --- a/lib/src/types/create_window_action.dart +++ b/lib/src/types/create_window_action.dart @@ -42,31 +42,27 @@ class CreateWindowAction_ extends NavigationAction_ { CreateWindowAction_( {required this.windowId, - @Deprecated('Use isDialog instead') - this.androidIsDialog, + @Deprecated('Use isDialog instead') this.androidIsDialog, this.isDialog, - @Deprecated('Use windowFeatures instead') - this.iosWindowFeatures, + @Deprecated('Use windowFeatures instead') this.iosWindowFeatures, this.windowFeatures, required URLRequest_ request, required bool isForMainFrame, - @Deprecated('Use hasGesture instead') - bool? androidHasGesture, - @Deprecated('Use isRedirect instead') - bool? androidIsRedirect, + @Deprecated('Use hasGesture instead') bool? androidHasGesture, + @Deprecated('Use isRedirect instead') bool? androidIsRedirect, bool? hasGesture, bool? isRedirect, @Deprecated('Use navigationType instead') - // ignore: deprecated_member_use_from_same_package - IOSWKNavigationType_? iosWKNavigationType, + // ignore: deprecated_member_use_from_same_package + IOSWKNavigationType_? iosWKNavigationType, NavigationType_? navigationType, @Deprecated('Use sourceFrame instead') - // ignore: deprecated_member_use_from_same_package - IOSWKFrameInfo_? iosSourceFrame, + // ignore: deprecated_member_use_from_same_package + IOSWKFrameInfo_? iosSourceFrame, FrameInfo_? sourceFrame, @Deprecated('Use targetFrame instead') - // ignore: deprecated_member_use_from_same_package - IOSWKFrameInfo_? iosTargetFrame, + // ignore: deprecated_member_use_from_same_package + IOSWKFrameInfo_? iosTargetFrame, FrameInfo_? targetFrame}) : super( request: request, diff --git a/lib/src/types/create_window_action.g.dart b/lib/src/types/create_window_action.g.dart index e8871432..ed616a63 100644 --- a/lib/src/types/create_window_action.g.dart +++ b/lib/src/types/create_window_action.g.dart @@ -32,29 +32,23 @@ class CreateWindowAction extends NavigationAction { ///The window id. Used by [WebView] to create a new WebView. int windowId; CreateWindowAction( - {@Deprecated('Use isDialog instead') - this.androidIsDialog, - @Deprecated('Use windowFeatures instead') - this.iosWindowFeatures, + {@Deprecated('Use isDialog instead') this.androidIsDialog, + @Deprecated('Use windowFeatures instead') this.iosWindowFeatures, this.isDialog, this.windowFeatures, required this.windowId, required URLRequest request, required bool isForMainFrame, - @Deprecated('Use hasGesture instead') - bool? androidHasGesture, + @Deprecated('Use hasGesture instead') bool? androidHasGesture, bool? hasGesture, - @Deprecated('Use isRedirect instead') - bool? androidIsRedirect, + @Deprecated('Use isRedirect instead') bool? androidIsRedirect, bool? isRedirect, @Deprecated('Use navigationType instead') - IOSWKNavigationType? iosWKNavigationType, + IOSWKNavigationType? iosWKNavigationType, NavigationType? navigationType, - @Deprecated('Use sourceFrame instead') - IOSWKFrameInfo? iosSourceFrame, + @Deprecated('Use sourceFrame instead') IOSWKFrameInfo? iosSourceFrame, FrameInfo? sourceFrame, - @Deprecated('Use targetFrame instead') - IOSWKFrameInfo? iosTargetFrame, + @Deprecated('Use targetFrame instead') IOSWKFrameInfo? iosTargetFrame, FrameInfo? targetFrame, bool? shouldPerformDownload}) : super( diff --git a/lib/src/types/url_protection_space.dart b/lib/src/types/url_protection_space.dart index 302ca4ff..2e18696b 100644 --- a/lib/src/types/url_protection_space.dart +++ b/lib/src/types/url_protection_space.dart @@ -132,15 +132,13 @@ class URLProtectionSpace_ { this.sslCertificate, this.sslError, @Deprecated("Use authenticationMethod instead") - this.iosAuthenticationMethod, + this.iosAuthenticationMethod, this.authenticationMethod, - @Deprecated("Use distinguishedNames instead") - this.iosDistinguishedNames, + @Deprecated("Use distinguishedNames instead") this.iosDistinguishedNames, this.distinguishedNames, @Deprecated("Use receivesCredentialSecurely instead") - this.iosReceivesCredentialSecurely, + this.iosReceivesCredentialSecurely, this.receivesCredentialSecurely, - @Deprecated("Use proxyType instead") - this.iosProxyType, + @Deprecated("Use proxyType instead") this.iosProxyType, this.proxyType}); } diff --git a/lib/src/types/url_protection_space.g.dart b/lib/src/types/url_protection_space.g.dart index 8d6bdb75..bb43c85e 100644 --- a/lib/src/types/url_protection_space.g.dart +++ b/lib/src/types/url_protection_space.g.dart @@ -81,13 +81,11 @@ class URLProtectionSpace { this.distinguishedNames, required this.host, @Deprecated('Use authenticationMethod instead') - this.iosAuthenticationMethod, - @Deprecated('Use distinguishedNames instead') - this.iosDistinguishedNames, - @Deprecated('Use proxyType instead') - this.iosProxyType, + this.iosAuthenticationMethod, + @Deprecated('Use distinguishedNames instead') this.iosDistinguishedNames, + @Deprecated('Use proxyType instead') this.iosProxyType, @Deprecated('Use receivesCredentialSecurely instead') - this.iosReceivesCredentialSecurely, + this.iosReceivesCredentialSecurely, this.port, this.protocol, this.proxyType, diff --git a/lib/src/types/url_request.dart b/lib/src/types/url_request.dart index 9e7448e3..e737a6f7 100644 --- a/lib/src/types/url_request.dart +++ b/lib/src/types/url_request.dart @@ -223,31 +223,27 @@ class URLRequest_ { this.headers, this.body, @Deprecated("Use allowsCellularAccess instead") - this.iosAllowsCellularAccess, + this.iosAllowsCellularAccess, this.allowsCellularAccess, @Deprecated("Use allowsConstrainedNetworkAccess instead") - this.iosAllowsConstrainedNetworkAccess, + this.iosAllowsConstrainedNetworkAccess, this.allowsConstrainedNetworkAccess, @Deprecated("Use allowsExpensiveNetworkAccess instead") - this.iosAllowsExpensiveNetworkAccess, + this.iosAllowsExpensiveNetworkAccess, this.allowsExpensiveNetworkAccess, - @Deprecated("Use cachePolicy instead") - this.iosCachePolicy, + @Deprecated("Use cachePolicy instead") this.iosCachePolicy, this.cachePolicy, @Deprecated("Use httpShouldHandleCookies instead") - this.iosHttpShouldHandleCookies, + this.iosHttpShouldHandleCookies, this.httpShouldHandleCookies, @Deprecated("Use httpShouldUsePipelining instead") - this.iosHttpShouldUsePipelining, + this.iosHttpShouldUsePipelining, this.httpShouldUsePipelining, - @Deprecated("Use networkServiceType instead") - this.iosNetworkServiceType, + @Deprecated("Use networkServiceType instead") this.iosNetworkServiceType, this.networkServiceType, - @Deprecated("Use timeoutInterval instead") - this.iosTimeoutInterval, + @Deprecated("Use timeoutInterval instead") this.iosTimeoutInterval, this.timeoutInterval, - @Deprecated("Use mainDocumentURL instead") - this.iosMainDocumentURL, + @Deprecated("Use mainDocumentURL instead") this.iosMainDocumentURL, this.mainDocumentURL, this.assumesHTTP3Capable, this.attribution}); diff --git a/lib/src/types/url_request.g.dart b/lib/src/types/url_request.g.dart index c6b1d7ea..2bce38df 100644 --- a/lib/src/types/url_request.g.dart +++ b/lib/src/types/url_request.g.dart @@ -151,23 +151,19 @@ class URLRequest { this.httpShouldHandleCookies, this.httpShouldUsePipelining, @Deprecated('Use allowsCellularAccess instead') - this.iosAllowsCellularAccess, + this.iosAllowsCellularAccess, @Deprecated('Use allowsConstrainedNetworkAccess instead') - this.iosAllowsConstrainedNetworkAccess, + this.iosAllowsConstrainedNetworkAccess, @Deprecated('Use allowsExpensiveNetworkAccess instead') - this.iosAllowsExpensiveNetworkAccess, - @Deprecated('Use cachePolicy instead') - this.iosCachePolicy, + this.iosAllowsExpensiveNetworkAccess, + @Deprecated('Use cachePolicy instead') this.iosCachePolicy, @Deprecated('Use httpShouldHandleCookies instead') - this.iosHttpShouldHandleCookies, + this.iosHttpShouldHandleCookies, @Deprecated('Use httpShouldUsePipelining instead') - this.iosHttpShouldUsePipelining, - @Deprecated('Use mainDocumentURL instead') - this.iosMainDocumentURL, - @Deprecated('Use networkServiceType instead') - this.iosNetworkServiceType, - @Deprecated('Use timeoutInterval instead') - this.iosTimeoutInterval, + this.iosHttpShouldUsePipelining, + @Deprecated('Use mainDocumentURL instead') this.iosMainDocumentURL, + @Deprecated('Use networkServiceType instead') this.iosNetworkServiceType, + @Deprecated('Use timeoutInterval instead') this.iosTimeoutInterval, this.mainDocumentURL, this.method, this.networkServiceType, diff --git a/lib/src/util.dart b/lib/src/util.dart index 2daf0148..113ccf78 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -594,8 +594,8 @@ abstract class ChannelController implements Disposable { if (controller.disposed) { throw FlutterError( 'A ${controller.runtimeType} was used after being disposed.\n' - 'Once the ${controller.runtimeType} has been disposed, it ' - 'can no longer be used.', + 'Once the ${controller.runtimeType} has been disposed, it ' + 'can no longer be used.', ); } return true; @@ -605,22 +605,25 @@ abstract class ChannelController implements Disposable { } extension InternalChannelController on ChannelController { - set channel (MethodChannel? channel) => _channel = channel; + set channel(MethodChannel? channel) => _channel = channel; MethodChannel? get channel { assert(ChannelController.debugAssertNotDisposed(this)); return this._channel; } - set handler (Future Function(MethodCall call)? handler) => _handler = handler; + set handler(Future Function(MethodCall call)? handler) => + _handler = handler; Future Function(MethodCall call)? get handler => _handler; bool get disposed => _channel == null; initMethodCallHandler() { - assert(channel != null, 'Method Channel for ${runtimeType} not initialized!'); - assert(handler != null, 'Method Call Handler for ${runtimeType} not initialized!'); + assert( + channel != null, 'Method Channel for ${runtimeType} not initialized!'); + assert(handler != null, + 'Method Call Handler for ${runtimeType} not initialized!'); channel?.setMethodCallHandler((call) async { if (disposed) return null; @@ -640,4 +643,4 @@ extension InternalChannelController on ChannelController { channel = null; handler = null; } -} \ No newline at end of file +} diff --git a/lib/src/web_authentication_session/web_authenticate_session.dart b/lib/src/web_authentication_session/web_authenticate_session.dart index c535d4f8..f7a9acac 100755 --- a/lib/src/web_authentication_session/web_authenticate_session.dart +++ b/lib/src/web_authentication_session/web_authenticate_session.dart @@ -186,6 +186,7 @@ class WebAuthenticationSession extends ChannelController { ///- iOS static Future isAvailable() async { Map args = {}; - return await _sharedChannel.invokeMethod("isAvailable", args) ?? false; + return await _sharedChannel.invokeMethod("isAvailable", args) ?? + false; } } diff --git a/lib/src/web_message/web_message_listener.dart b/lib/src/web_message/web_message_listener.dart index f3136c50..cdc24b51 100644 --- a/lib/src/web_message/web_message_listener.dart +++ b/lib/src/web_message/web_message_listener.dart @@ -43,7 +43,7 @@ class WebMessageListener extends ChannelController { allowedOriginRules != null ? allowedOriginRules : Set.from(["*"]); assert(!this.allowedOriginRules.contains(""), "allowedOriginRules cannot contain empty strings"); - channel= MethodChannel( + channel = MethodChannel( 'com.pichillilorenzo/flutter_inappwebview_web_message_listener_${id}_$jsObjectName'); handler = _handleMethod; initMethodCallHandler();