From 0b0869ce2a9d41f86812a5f2a28e066196ad40cb Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Thu, 23 Nov 2023 16:06:50 +0100 Subject: [PATCH] updated debugLoggingSettings references, dart format --- .../cookie_manager/set_get_delete.dart | 15 +- .../convert_to_inappwebview.dart | 15 +- .../run_and_dispose.dart | 15 +- .../webview_flutter_test.dart | 12 +- .../lib/flutter_inappwebview_android.dart | 2 +- .../chrome_safari_browser.dart | 23 +- .../lib/src/cookie_manager.dart | 13 +- .../find_interaction_controller.dart | 5 +- .../lib/src/find_interaction/main.dart | 3 +- .../src/in_app_browser/in_app_browser.dart | 3 - .../src/in_app_webview/in_app_webview.dart | 3 +- .../lib/src/main.dart | 8 +- .../lib/src/platform_util.dart | 4 +- .../src/print_job/print_job_controller.dart | 1 - .../lib/src/process_global_config.dart | 27 +- .../lib/src/proxy_controller.dart | 21 +- .../pull_to_refresh_controller.dart | 5 +- .../lib/src/service_worker_controller.dart | 3 +- .../lib/src/tracing_controller.dart | 21 +- .../src/web_message/web_message_channel.dart | 6 +- .../src/web_message/web_message_listener.dart | 3 +- .../lib/src/web_message/web_message_port.dart | 20 +- .../lib/src/web_storage/web_storage.dart | 6 +- .../lib/src/webview_asset_loader.dart | 74 ++--- ...utter_inappwebview_platform_interface.dart | 2 +- .../platform_chrome_safari_browser.dart | 70 ++--- .../platform_find_interaction_controller.dart | 27 +- .../platform_in_app_browser.dart | 30 +- .../platform_inappwebview_controller.dart | 16 +- .../src/in_app_webview/platform_webview.dart | 235 +++++++--------- .../lib/src/inappwebview_platform.dart | 4 +- .../lib/src/platform_cookie_manager.dart | 3 +- ...atform_http_auth_credentials_database.dart | 19 +- .../src/platform_in_app_localhost_server.dart | 16 +- .../src/platform_process_global_config.dart | 18 +- .../lib/src/platform_proxy_controller.dart | 18 +- .../platform_service_worker_controller.dart | 30 +- .../lib/src/platform_tracing_controller.dart | 21 +- .../src/platform_webview_asset_loader.dart | 6 +- .../lib/src/platform_webview_feature.dart | 256 +++++++++--------- .../platform_pull_to_refresh_controller.dart | 28 +- .../lib/src/types/client_cert_challenge.dart | 1 - .../lib/src/types/client_cert_response.dart | 2 - .../lib/src/types/console_message.dart | 2 - .../lib/src/types/create_window_action.dart | 1 - .../lib/src/types/custom_scheme_response.dart | 2 - .../lib/src/types/download_start_request.dart | 1 - .../lib/src/types/force_dark_strategy.dart | 2 - .../src/types/form_resubmission_action.dart | 2 - ...ation_permission_show_prompt_response.dart | 2 - .../lib/src/types/http_auth_response.dart | 1 - .../types/http_authentication_challenge.dart | 1 - .../types/in_app_webview_initial_data.dart | 1 - .../lib/src/types/js_alert_request.dart | 1 - .../lib/src/types/js_alert_response.dart | 2 - .../src/types/js_before_unload_request.dart | 1 - .../src/types/js_before_unload_response.dart | 2 - .../lib/src/types/js_confirm_request.dart | 1 - .../lib/src/types/js_confirm_response.dart | 2 - .../lib/src/types/js_prompt_request.dart | 1 - .../lib/src/types/js_prompt_response.dart | 2 - .../lib/src/types/loaded_resource.dart | 1 - .../lib/src/types/login_request.dart | 2 - .../lib/src/types/main.dart | 2 +- .../lib/src/types/navigation_action.dart | 1 - .../src/types/navigation_action_policy.dart | 2 - .../lib/src/types/navigation_response.dart | 1 - .../src/types/navigation_response_action.dart | 2 - .../lib/src/types/navigation_type.dart | 2 - .../lib/src/types/over_scroll_mode.dart | 2 - .../lib/src/types/pdf_configuration.dart | 1 - .../lib/src/types/permission_request.dart | 1 - .../lib/src/types/permission_response.dart | 1 - .../src/types/render_process_gone_detail.dart | 1 - .../src/types/renderer_priority_policy.dart | 1 - .../lib/src/types/safe_browsing_response.dart | 1 - .../src/types/screenshot_configuration.dart | 1 - .../src/types/server_trust_auth_response.dart | 2 - .../lib/src/types/server_trust_challenge.dart | 1 - .../should_allow_deprecated_tls_action.dart | 2 - .../lib/src/types/user_script.dart | 1 - .../src/types/user_script_injection_time.dart | 1 - .../lib/src/types/web_history.dart | 2 - .../lib/src/types/web_history_item.dart | 2 - .../lib/src/types/web_resource_request.dart | 1 - .../lib/src/types/web_resource_response.dart | 2 - .../lib/src/types/webview_package_info.dart | 2 - .../types/webview_render_process_action.dart | 2 - .../platform_web_authenticate_session.dart | 35 ++- .../platform_web_message_channel.dart | 13 +- .../platform_web_message_listener.dart | 38 +-- .../src/web_storage/platform_web_storage.dart | 39 +-- .../chrome_safari_browser.dart | 4 - .../find_interaction_controller.dart | 11 +- lib/src/in_app_browser/in_app_browser.dart | 3 - .../android/in_app_webview_controller.dart | 3 +- lib/src/main.dart | 2 +- lib/src/print_job/print_job_controller.dart | 4 +- lib/src/process_global_config.dart | 12 +- lib/src/proxy_controller.dart | 11 +- .../pull_to_refresh_controller.dart | 3 - lib/src/tracing_controller.dart | 11 +- .../web_authenticate_session.dart | 3 - package.json | 2 +- 104 files changed, 631 insertions(+), 740 deletions(-) diff --git a/example/integration_test/cookie_manager/set_get_delete.dart b/example/integration_test/cookie_manager/set_get_delete.dart index fafc4ec7..5d9dd816 100644 --- a/example/integration_test/cookie_manager/set_get_delete.dart +++ b/example/integration_test/cookie_manager/set_get_delete.dart @@ -16,14 +16,13 @@ void setGetDelete() { final Completer pageLoaded = Completer(); var headlessWebView = new HeadlessInAppWebView( - initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), - onWebViewCreated: (controller) { - controllerCompleter.complete(controller); - }, - onLoadStop: (controller, url) async { - pageLoaded.complete(url!.toString()); - } - ); + initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), + onWebViewCreated: (controller) { + controllerCompleter.complete(controller); + }, + onLoadStop: (controller, url) async { + pageLoaded.complete(url!.toString()); + }); if (defaultTargetPlatform == TargetPlatform.macOS) { await headlessWebView.run(); diff --git a/example/integration_test/headless_in_app_webview/convert_to_inappwebview.dart b/example/integration_test/headless_in_app_webview/convert_to_inappwebview.dart index 1c396575..af88f38f 100644 --- a/example/integration_test/headless_in_app_webview/convert_to_inappwebview.dart +++ b/example/integration_test/headless_in_app_webview/convert_to_inappwebview.dart @@ -14,14 +14,13 @@ void convertToInAppWebView() { final Completer pageLoaded = Completer(); var headlessWebView = new HeadlessInAppWebView( - initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), - onWebViewCreated: (controller) { - controllerCompleter.complete(controller); - }, - onLoadStop: (controller, url) async { - pageLoaded.complete(); - } - ); + initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), + onWebViewCreated: (controller) { + controllerCompleter.complete(controller); + }, + onLoadStop: (controller, url) async { + pageLoaded.complete(); + }); await headlessWebView.run(); expect(headlessWebView.isRunning(), true); diff --git a/example/integration_test/headless_in_app_webview/run_and_dispose.dart b/example/integration_test/headless_in_app_webview/run_and_dispose.dart index 33dad366..8a9db01f 100644 --- a/example/integration_test/headless_in_app_webview/run_and_dispose.dart +++ b/example/integration_test/headless_in_app_webview/run_and_dispose.dart @@ -15,14 +15,13 @@ void runAndDispose() { final Completer pageLoaded = Completer(); var headlessWebView = new HeadlessInAppWebView( - initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), - onWebViewCreated: (controller) { - controllerCompleter.complete(controller); - }, - onLoadStop: (controller, url) async { - pageLoaded.complete(); - } - ); + initialUrlRequest: URLRequest(url: TEST_CROSS_PLATFORM_URL_1), + onWebViewCreated: (controller) { + controllerCompleter.complete(controller); + }, + onLoadStop: (controller, url) async { + pageLoaded.complete(); + }); await headlessWebView.run(); expect(headlessWebView.isRunning(), true); diff --git a/example/integration_test/webview_flutter_test.dart b/example/integration_test/webview_flutter_test.dart index b6de238a..2d7f9ec1 100644 --- a/example/integration_test/webview_flutter_test.dart +++ b/example/integration_test/webview_flutter_test.dart @@ -19,17 +19,21 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); PlatformInAppWebViewController.debugLoggingSettings.usePrint = true; - PlatformInAppWebViewController.debugLoggingSettings.maxLogMessageLength = 7000; + PlatformInAppWebViewController.debugLoggingSettings.maxLogMessageLength = + 7000; PlatformInAppBrowser.debugLoggingSettings.usePrint = true; PlatformInAppBrowser.debugLoggingSettings.maxLogMessageLength = 7000; PlatformChromeSafariBrowser.debugLoggingSettings.usePrint = true; PlatformChromeSafariBrowser.debugLoggingSettings.maxLogMessageLength = 7000; PlatformWebAuthenticationSession.debugLoggingSettings.usePrint = true; - PlatformWebAuthenticationSession.debugLoggingSettings.maxLogMessageLength = 7000; + PlatformWebAuthenticationSession.debugLoggingSettings.maxLogMessageLength = + 7000; PlatformPullToRefreshController.debugLoggingSettings.usePrint = true; - PlatformPullToRefreshController.debugLoggingSettings.maxLogMessageLength = 7000; + PlatformPullToRefreshController.debugLoggingSettings.maxLogMessageLength = + 7000; PlatformFindInteractionController.debugLoggingSettings.usePrint = true; - PlatformFindInteractionController.debugLoggingSettings.maxLogMessageLength = 7000; + PlatformFindInteractionController.debugLoggingSettings.maxLogMessageLength = + 7000; process_global_config_tests.main(); in_app_webview_tests.main(); diff --git a/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart b/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart index 3f3145f4..dd86c9e0 100644 --- a/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart +++ b/flutter_inappwebview_android/lib/flutter_inappwebview_android.dart @@ -1,3 +1,3 @@ library flutter_inappwebview_android; -export 'src/main.dart'; \ No newline at end of file +export 'src/main.dart'; diff --git a/flutter_inappwebview_android/lib/src/chrome_safari_browser/chrome_safari_browser.dart b/flutter_inappwebview_android/lib/src/chrome_safari_browser/chrome_safari_browser.dart index 5e1a3309..ee917f5c 100755 --- a/flutter_inappwebview_android/lib/src/chrome_safari_browser/chrome_safari_browser.dart +++ b/flutter_inappwebview_android/lib/src/chrome_safari_browser/chrome_safari_browser.dart @@ -36,24 +36,22 @@ class AndroidChromeSafariBrowserCreationParams ///**Supported Platforms/Implementations**: ///- Android ///- iOS -class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser with ChannelController { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - +class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser + with ChannelController { ///View ID used internally. final String id = IdGenerator.generate(); /// Constructs a [AndroidChromeSafariBrowser]. AndroidChromeSafariBrowser(PlatformChromeSafariBrowserCreationParams params) : super.implementation( - params is AndroidChromeSafariBrowserCreationParams - ? params - : AndroidChromeSafariBrowserCreationParams - .fromPlatformChromeSafariBrowserCreationParams(params), - ); + params is AndroidChromeSafariBrowserCreationParams + ? params + : AndroidChromeSafariBrowserCreationParams + .fromPlatformChromeSafariBrowserCreationParams(params), + ); static final AndroidChromeSafariBrowser _staticValue = - AndroidChromeSafariBrowser(AndroidChromeSafariBrowserCreationParams()); + AndroidChromeSafariBrowser(AndroidChromeSafariBrowserCreationParams()); factory AndroidChromeSafariBrowser.static() { return _staticValue; @@ -77,7 +75,7 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser with Channe debugLog( className: this.runtimeType.toString(), id: id, - debugLoggingSettings: AndroidChromeSafariBrowser.debugLoggingSettings, + debugLoggingSettings: PlatformChromeSafariBrowser.debugLoggingSettings, method: method, args: args); } @@ -113,7 +111,8 @@ class AndroidChromeSafariBrowser extends PlatformChromeSafariBrowser with Channe ? WebUri(call.arguments["requestedOrigin"]) : null; final bool result = call.arguments["result"]; - eventHandler?.onRelationshipValidationResult(relation, requestedOrigin, result); + eventHandler?.onRelationshipValidationResult( + relation, requestedOrigin, result); break; case "onWillOpenInBrowser": eventHandler?.onWillOpenInBrowser(); diff --git a/flutter_inappwebview_android/lib/src/cookie_manager.dart b/flutter_inappwebview_android/lib/src/cookie_manager.dart index b817af0c..df88449c 100755 --- a/flutter_inappwebview_android/lib/src/cookie_manager.dart +++ b/flutter_inappwebview_android/lib/src/cookie_manager.dart @@ -189,13 +189,12 @@ class AndroidCookieManager extends PlatformCookieManager final setCookieCompleter = Completer(); final headlessWebView = AndroidHeadlessInAppWebView(AndroidHeadlessInAppWebViewCreationParams( - initialUrlRequest: URLRequest(url: url), - onLoadStop: (controller, url) async { - await controller.evaluateJavascript( - source: 'document.cookie="$cookieValue"'); - setCookieCompleter.complete(); - } - )); + initialUrlRequest: URLRequest(url: url), + onLoadStop: (controller, url) async { + await controller.evaluateJavascript( + source: 'document.cookie="$cookieValue"'); + setCookieCompleter.complete(); + })); await headlessWebView.run(); await setCookieCompleter.future; await headlessWebView.dispose(); diff --git a/flutter_inappwebview_android/lib/src/find_interaction/find_interaction_controller.dart b/flutter_inappwebview_android/lib/src/find_interaction/find_interaction_controller.dart index c789a091..3c443f8c 100644 --- a/flutter_inappwebview_android/lib/src/find_interaction/find_interaction_controller.dart +++ b/flutter_inappwebview_android/lib/src/find_interaction/find_interaction_controller.dart @@ -30,9 +30,6 @@ class AndroidFindInteractionControllerCreationParams ///- MacOS class AndroidFindInteractionController extends PlatformFindInteractionController with ChannelController { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - /// Constructs a [AndroidFindInteractionController]. AndroidFindInteractionController( PlatformFindInteractionControllerCreationParams params) @@ -47,7 +44,7 @@ class AndroidFindInteractionController extends PlatformFindInteractionController debugLog( className: this.runtimeType.toString(), debugLoggingSettings: - AndroidFindInteractionController.debugLoggingSettings, + PlatformFindInteractionController.debugLoggingSettings, method: method, args: args); } diff --git a/flutter_inappwebview_android/lib/src/find_interaction/main.dart b/flutter_inappwebview_android/lib/src/find_interaction/main.dart index 433e2f36..a7adaacf 100644 --- a/flutter_inappwebview_android/lib/src/find_interaction/main.dart +++ b/flutter_inappwebview_android/lib/src/find_interaction/main.dart @@ -1 +1,2 @@ -export 'find_interaction_controller.dart' hide InternalFindInteractionController; +export 'find_interaction_controller.dart' + hide InternalFindInteractionController; diff --git a/flutter_inappwebview_android/lib/src/in_app_browser/in_app_browser.dart b/flutter_inappwebview_android/lib/src/in_app_browser/in_app_browser.dart index 599b71b4..084c55a5 100755 --- a/flutter_inappwebview_android/lib/src/in_app_browser/in_app_browser.dart +++ b/flutter_inappwebview_android/lib/src/in_app_browser/in_app_browser.dart @@ -54,9 +54,6 @@ class AndroidInAppBrowserCreationParams ///- iOS ///- MacOS class AndroidInAppBrowser extends PlatformInAppBrowser with ChannelController { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - ///View ID used internally. final String id = IdGenerator.generate(); diff --git a/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview.dart b/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview.dart index 6e8e4756..367d41b4 100755 --- a/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview.dart +++ b/flutter_inappwebview_android/lib/src/in_app_webview/in_app_webview.dart @@ -416,7 +416,8 @@ class AndroidInAppWebViewWidget extends PlatformInAppWebViewWidget { method: "onWebViewCreated", args: []); if (_androidParams.onWebViewCreated != null) { - _androidParams.onWebViewCreated!(params.controllerFromPlatform?.call(_controller!) ?? _controller!); + _androidParams.onWebViewCreated!( + params.controllerFromPlatform?.call(_controller!) ?? _controller!); } } diff --git a/flutter_inappwebview_android/lib/src/main.dart b/flutter_inappwebview_android/lib/src/main.dart index 84c344d1..b49714ad 100644 --- a/flutter_inappwebview_android/lib/src/main.dart +++ b/flutter_inappwebview_android/lib/src/main.dart @@ -4,15 +4,15 @@ export 'in_app_browser/main.dart'; export 'chrome_safari_browser/main.dart'; export 'web_storage/main.dart'; export 'cookie_manager.dart' hide InternalCookieManager; -export 'http_auth_credentials_database.dart' hide InternalHttpAuthCredentialDatabase; +export 'http_auth_credentials_database.dart' + hide InternalHttpAuthCredentialDatabase; export 'pull_to_refresh/main.dart'; export 'web_message/main.dart'; export 'print_job/main.dart'; export 'find_interaction/main.dart'; export 'service_worker_controller.dart'; -export 'webview_feature.dart' - hide InternalWebViewFeature; +export 'webview_feature.dart' hide InternalWebViewFeature; export 'proxy_controller.dart' hide InternalProxyController; export 'webview_asset_loader.dart'; export 'tracing_controller.dart' hide InternalTracingController; -export 'process_global_config.dart' hide InternalProcessGlobalConfig; \ No newline at end of file +export 'process_global_config.dart' hide InternalProcessGlobalConfig; diff --git a/flutter_inappwebview_android/lib/src/platform_util.dart b/flutter_inappwebview_android/lib/src/platform_util.dart index e84f9a15..27e96478 100644 --- a/flutter_inappwebview_android/lib/src/platform_util.dart +++ b/flutter_inappwebview_android/lib/src/platform_util.dart @@ -3,8 +3,8 @@ import 'package:flutter/services.dart'; ///Platform native utilities class PlatformUtil { static PlatformUtil? _instance; - static const MethodChannel _channel = MethodChannel( - 'com.pichillilorenzo/flutter_inappwebview_platformutil'); + static const MethodChannel _channel = + MethodChannel('com.pichillilorenzo/flutter_inappwebview_platformutil'); PlatformUtil._(); diff --git a/flutter_inappwebview_android/lib/src/print_job/print_job_controller.dart b/flutter_inappwebview_android/lib/src/print_job/print_job_controller.dart index 771b29ca..64a904df 100644 --- a/flutter_inappwebview_android/lib/src/print_job/print_job_controller.dart +++ b/flutter_inappwebview_android/lib/src/print_job/print_job_controller.dart @@ -125,4 +125,3 @@ class AndroidPrintJobController extends PlatformPrintJobController disposeChannel(); } } - diff --git a/flutter_inappwebview_android/lib/src/process_global_config.dart b/flutter_inappwebview_android/lib/src/process_global_config.dart index 8dacc426..a8f843b3 100644 --- a/flutter_inappwebview_android/lib/src/process_global_config.dart +++ b/flutter_inappwebview_android/lib/src/process_global_config.dart @@ -13,10 +13,10 @@ class AndroidProcessGlobalConfigCreationParams extends PlatformProcessGlobalConfigCreationParams { /// Creates a new [AndroidProcessGlobalConfigCreationParams] instance. const AndroidProcessGlobalConfigCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformProcessGlobalConfigCreationParams params, - ) : super(); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformProcessGlobalConfigCreationParams params, + ) : super(); /// Creates a [AndroidProcessGlobalConfigCreationParams] instance based on [PlatformProcessGlobalConfigCreationParams]. factory AndroidProcessGlobalConfigCreationParams.fromPlatformProcessGlobalConfigCreationParams( @@ -47,15 +47,16 @@ class AndroidProcessGlobalConfigCreationParams /// ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - ProcessGlobalConfig](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig)) -class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig with ChannelController { +class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig + with ChannelController { /// Creates a new [AndroidProcessGlobalConfig]. AndroidProcessGlobalConfig(PlatformProcessGlobalConfigCreationParams params) : super.implementation( - params is AndroidProcessGlobalConfigCreationParams - ? params - : AndroidProcessGlobalConfigCreationParams - .fromPlatformProcessGlobalConfigCreationParams(params), - ) { + params is AndroidProcessGlobalConfigCreationParams + ? params + : AndroidProcessGlobalConfigCreationParams + .fromPlatformProcessGlobalConfigCreationParams(params), + ) { channel = const MethodChannel( 'com.pichillilorenzo/flutter_inappwebview_processglobalconfig'); handler = handleMethod; @@ -70,8 +71,9 @@ class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig with Channe } static AndroidProcessGlobalConfig _init() { - _instance = AndroidProcessGlobalConfig(AndroidProcessGlobalConfigCreationParams( - const PlatformProcessGlobalConfigCreationParams())); + _instance = AndroidProcessGlobalConfig( + AndroidProcessGlobalConfigCreationParams( + const PlatformProcessGlobalConfigCreationParams())); return _instance!; } @@ -99,4 +101,3 @@ class AndroidProcessGlobalConfig extends PlatformProcessGlobalConfig with Channe extension InternalProcessGlobalConfig on AndroidProcessGlobalConfig { get handleMethod => _handleMethod; } - diff --git a/flutter_inappwebview_android/lib/src/proxy_controller.dart b/flutter_inappwebview_android/lib/src/proxy_controller.dart index 8735fbe5..ad0d3518 100644 --- a/flutter_inappwebview_android/lib/src/proxy_controller.dart +++ b/flutter_inappwebview_android/lib/src/proxy_controller.dart @@ -13,10 +13,10 @@ class AndroidProxyControllerCreationParams extends PlatformProxyControllerCreationParams { /// Creates a new [AndroidProxyControllerCreationParams] instance. const AndroidProxyControllerCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformProxyControllerCreationParams params, - ) : super(); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformProxyControllerCreationParams params, + ) : super(); /// Creates a [AndroidProxyControllerCreationParams] instance based on [PlatformProxyControllerCreationParams]. factory AndroidProxyControllerCreationParams.fromPlatformProxyControllerCreationParams( @@ -35,15 +35,16 @@ class AndroidProxyControllerCreationParams /// ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - ProxyController](https://developer.android.com/reference/androidx/webkit/ProxyController)) -class AndroidProxyController extends PlatformProxyController with ChannelController { +class AndroidProxyController extends PlatformProxyController + with ChannelController { /// Creates a new [AndroidProxyController]. AndroidProxyController(PlatformProxyControllerCreationParams params) : super.implementation( - params is AndroidProxyControllerCreationParams - ? params - : AndroidProxyControllerCreationParams - .fromPlatformProxyControllerCreationParams(params), - ) { + params is AndroidProxyControllerCreationParams + ? params + : AndroidProxyControllerCreationParams + .fromPlatformProxyControllerCreationParams(params), + ) { channel = const MethodChannel( 'com.pichillilorenzo/flutter_inappwebview_proxycontroller'); handler = handleMethod; diff --git a/flutter_inappwebview_android/lib/src/pull_to_refresh/pull_to_refresh_controller.dart b/flutter_inappwebview_android/lib/src/pull_to_refresh/pull_to_refresh_controller.dart index 8777d5e5..c5062591 100644 --- a/flutter_inappwebview_android/lib/src/pull_to_refresh/pull_to_refresh_controller.dart +++ b/flutter_inappwebview_android/lib/src/pull_to_refresh/pull_to_refresh_controller.dart @@ -39,9 +39,6 @@ class AndroidPullToRefreshControllerCreationParams ///- iOS class AndroidPullToRefreshController extends PlatformPullToRefreshController with ChannelController { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - /// Constructs a [AndroidPullToRefreshController]. AndroidPullToRefreshController( PlatformPullToRefreshControllerCreationParams params) @@ -56,7 +53,7 @@ class AndroidPullToRefreshController extends PlatformPullToRefreshController debugLog( className: this.runtimeType.toString(), debugLoggingSettings: - AndroidPullToRefreshController.debugLoggingSettings, + PlatformPullToRefreshController.debugLoggingSettings, method: method, args: args); } diff --git a/flutter_inappwebview_android/lib/src/service_worker_controller.dart b/flutter_inappwebview_android/lib/src/service_worker_controller.dart index 0a07137a..7c51306a 100644 --- a/flutter_inappwebview_android/lib/src/service_worker_controller.dart +++ b/flutter_inappwebview_android/lib/src/service_worker_controller.dart @@ -114,7 +114,8 @@ class AndroidServiceWorkerController extends PlatformServiceWorkerController ///**Official Android API**: https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#getAllowContentAccess() Future getAllowContentAccess() async { Map args = {}; - return await channel?.invokeMethod('getAllowContentAccess', args) ?? false; + return await channel?.invokeMethod('getAllowContentAccess', args) ?? + false; } ///Gets whether Service Workers support file access. diff --git a/flutter_inappwebview_android/lib/src/tracing_controller.dart b/flutter_inappwebview_android/lib/src/tracing_controller.dart index 5616e784..4eedc1d4 100644 --- a/flutter_inappwebview_android/lib/src/tracing_controller.dart +++ b/flutter_inappwebview_android/lib/src/tracing_controller.dart @@ -13,10 +13,10 @@ class AndroidTracingControllerCreationParams extends PlatformTracingControllerCreationParams { /// Creates a new [AndroidTracingControllerCreationParams] instance. const AndroidTracingControllerCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformTracingControllerCreationParams params, - ) : super(); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformTracingControllerCreationParams params, + ) : super(); /// Creates a [AndroidTracingControllerCreationParams] instance based on [PlatformTracingControllerCreationParams]. factory AndroidTracingControllerCreationParams.fromPlatformTracingControllerCreationParams( @@ -34,15 +34,16 @@ class AndroidTracingControllerCreationParams /// ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - TracingController](https://developer.android.com/reference/androidx/webkit/TracingController)) -class AndroidTracingController extends PlatformTracingController with ChannelController { +class AndroidTracingController extends PlatformTracingController + with ChannelController { /// Creates a new [AndroidTracingController]. AndroidTracingController(PlatformTracingControllerCreationParams params) : super.implementation( - params is AndroidTracingControllerCreationParams - ? params - : AndroidTracingControllerCreationParams - .fromPlatformTracingControllerCreationParams(params), - ) { + params is AndroidTracingControllerCreationParams + ? params + : AndroidTracingControllerCreationParams + .fromPlatformTracingControllerCreationParams(params), + ) { channel = const MethodChannel( 'com.pichillilorenzo/flutter_inappwebview_tracingcontroller'); handler = handleMethod; diff --git a/flutter_inappwebview_android/lib/src/web_message/web_message_channel.dart b/flutter_inappwebview_android/lib/src/web_message/web_message_channel.dart index 2661b3ba..b04ce250 100644 --- a/flutter_inappwebview_android/lib/src/web_message/web_message_channel.dart +++ b/flutter_inappwebview_android/lib/src/web_message/web_message_channel.dart @@ -64,11 +64,9 @@ class AndroidWebMessageChannel extends PlatformWebMessageChannel return _staticValue; } - AndroidWebMessagePort get _androidPort1 => - port1 as AndroidWebMessagePort; + AndroidWebMessagePort get _androidPort1 => port1 as AndroidWebMessagePort; - AndroidWebMessagePort get _androidPort2 => - port2 as AndroidWebMessagePort; + AndroidWebMessagePort get _androidPort2 => port2 as AndroidWebMessagePort; static AndroidWebMessageChannel? _fromMap(Map? map) { if (map == null) { diff --git a/flutter_inappwebview_android/lib/src/web_message/web_message_listener.dart b/flutter_inappwebview_android/lib/src/web_message/web_message_listener.dart index 115f4737..2c9baa79 100644 --- a/flutter_inappwebview_android/lib/src/web_message/web_message_listener.dart +++ b/flutter_inappwebview_android/lib/src/web_message/web_message_listener.dart @@ -85,8 +85,7 @@ class AndroidWebMessageListener extends PlatformWebMessageListener ? WebUri(call.arguments["sourceOrigin"]) : null; bool isMainFrame = call.arguments["isMainFrame"]; - onPostMessage!( - message, sourceOrigin, isMainFrame, _replyProxy!); + onPostMessage!(message, sourceOrigin, isMainFrame, _replyProxy!); } break; default: diff --git a/flutter_inappwebview_android/lib/src/web_message/web_message_port.dart b/flutter_inappwebview_android/lib/src/web_message/web_message_port.dart index 9e171f98..8d66fdf9 100644 --- a/flutter_inappwebview_android/lib/src/web_message/web_message_port.dart +++ b/flutter_inappwebview_android/lib/src/web_message/web_message_port.dart @@ -12,16 +12,14 @@ import 'web_message_channel.dart'; class AndroidWebMessagePortCreationParams extends PlatformWebMessagePortCreationParams { /// Creates a new [AndroidWebMessagePortCreationParams] instance. - const AndroidWebMessagePortCreationParams( - {required super.index}); + const AndroidWebMessagePortCreationParams({required super.index}); /// Creates a [AndroidWebMessagePortCreationParams] instance based on [PlatformWebMessagePortCreationParams]. factory AndroidWebMessagePortCreationParams.fromPlatformWebMessagePortCreationParams( // Recommended placeholder to prevent being broken by platform interface. // ignore: avoid_unused_constructor_parameters PlatformWebMessagePortCreationParams params) { - return AndroidWebMessagePortCreationParams( - index: params.index); + return AndroidWebMessagePortCreationParams(index: params.index); } @override @@ -49,19 +47,17 @@ class AndroidWebMessagePortCreationParams /// ///It is possible to transfer both ports of a channel to JavaScript, for example for communication between subframes. class AndroidWebMessagePort extends PlatformWebMessagePort { - WebMessageCallback? _onMessage; late AndroidWebMessageChannel _webMessageChannel; /// Constructs a [AndroidWebMessagePort]. - AndroidWebMessagePort( - PlatformWebMessagePortCreationParams params) + AndroidWebMessagePort(PlatformWebMessagePortCreationParams params) : super.implementation( - params is AndroidWebMessagePortCreationParams - ? params - : AndroidWebMessagePortCreationParams - .fromPlatformWebMessagePortCreationParams(params), - ); + params is AndroidWebMessagePortCreationParams + ? params + : AndroidWebMessagePortCreationParams + .fromPlatformWebMessagePortCreationParams(params), + ); ///Sets a callback to receive message events on the main thread. Future setWebMessageCallback(WebMessageCallback? onMessage) async { diff --git a/flutter_inappwebview_android/lib/src/web_storage/web_storage.dart b/flutter_inappwebview_android/lib/src/web_storage/web_storage.dart index 161d02ba..fb068852 100644 --- a/flutter_inappwebview_android/lib/src/web_storage/web_storage.dart +++ b/flutter_inappwebview_android/lib/src/web_storage/web_storage.dart @@ -253,7 +253,8 @@ class AndroidLocalStorageCreationParams ///Class that provides methods to manage the JavaScript `window.localStorage` object. ///It used by [AndroidWebStorage]. -class AndroidLocalStorage extends AndroidStorage implements PlatformLocalStorage { +class AndroidLocalStorage extends AndroidStorage + implements PlatformLocalStorage { /// Constructs a [AndroidLocalStorage]. AndroidLocalStorage(PlatformLocalStorageCreationParams params) : super( @@ -292,7 +293,8 @@ class AndroidSessionStorageCreationParams ///Class that provides methods to manage the JavaScript `window.sessionStorage` object. ///It used by [AndroidWebStorage]. -class AndroidSessionStorage extends AndroidStorage implements PlatformSessionStorage { +class AndroidSessionStorage extends AndroidStorage + implements PlatformSessionStorage { /// Constructs a [AndroidSessionStorage]. AndroidSessionStorage(PlatformSessionStorageCreationParams params) : super( diff --git a/flutter_inappwebview_android/lib/src/webview_asset_loader.dart b/flutter_inappwebview_android/lib/src/webview_asset_loader.dart index 904083e8..cc754767 100644 --- a/flutter_inappwebview_android/lib/src/webview_asset_loader.dart +++ b/flutter_inappwebview_android/lib/src/webview_asset_loader.dart @@ -27,8 +27,7 @@ class AndroidPathHandlerCreationParams ///A handler that produces responses for a registered path. /// ///Implement this interface to handle other use-cases according to your app's needs. -class AndroidPathHandler extends PlatformPathHandler - with ChannelController { +class AndroidPathHandler extends PlatformPathHandler with ChannelController { /// Creates a new [AndroidPathHandler]. AndroidPathHandler(PlatformPathHandlerCreationParams params) : super.implementation( @@ -90,10 +89,10 @@ class AndroidAssetsPathHandlerCreationParams extends PlatformAssetsPathHandlerCreationParams { /// Creates a new [AndroidAssetsPathHandlerCreationParams] instance. AndroidAssetsPathHandlerCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformAssetsPathHandlerCreationParams params, - ) : super(params); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformAssetsPathHandlerCreationParams params, + ) : super(params); /// Creates a [AndroidAssetsPathHandlerCreationParams] instance based on [PlatformAssetsPathHandlerCreationParams]. factory AndroidAssetsPathHandlerCreationParams.fromPlatformAssetsPathHandlerCreationParams( @@ -115,15 +114,16 @@ class AndroidAssetsPathHandlerCreationParams ///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-). ///Developers should ensure that asset files are named using standard file extensions. ///If the file does not have a recognised extension, `text/plain` will be used by default. -class AndroidAssetsPathHandler extends AndroidPathHandler implements PlatformAssetsPathHandler { +class AndroidAssetsPathHandler extends AndroidPathHandler + implements PlatformAssetsPathHandler { /// Constructs a [AndroidAssetsPathHandler]. AndroidAssetsPathHandler(PlatformAssetsPathHandlerCreationParams params) : super( - params is AndroidAssetsPathHandlerCreationParams - ? params - : AndroidAssetsPathHandlerCreationParams - .fromPlatformAssetsPathHandlerCreationParams(params), - ); + params is AndroidAssetsPathHandlerCreationParams + ? params + : AndroidAssetsPathHandlerCreationParams + .fromPlatformAssetsPathHandlerCreationParams(params), + ); } /// Object specifying creation parameters for creating a [AndroidResourcesPathHandler]. @@ -136,10 +136,10 @@ class AndroidResourcesPathHandlerCreationParams extends PlatformResourcesPathHandlerCreationParams { /// Creates a new [AndroidResourcesPathHandlerCreationParams] instance. AndroidResourcesPathHandlerCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformResourcesPathHandlerCreationParams params, - ) : super(params); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformResourcesPathHandlerCreationParams params, + ) : super(params); /// Creates a [AndroidResourcesPathHandlerCreationParams] instance based on [PlatformResourcesPathHandlerCreationParams]. factory AndroidResourcesPathHandlerCreationParams.fromPlatformResourcesPathHandlerCreationParams( @@ -161,15 +161,16 @@ class AndroidResourcesPathHandlerCreationParams ///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-). ///Developers should ensure that asset files are named using standard file extensions. ///If the file does not have a recognised extension, `text/plain` will be used by default. -class AndroidResourcesPathHandler extends AndroidPathHandler implements PlatformResourcesPathHandler { +class AndroidResourcesPathHandler extends AndroidPathHandler + implements PlatformResourcesPathHandler { /// Constructs a [AndroidResourcesPathHandler]. AndroidResourcesPathHandler(PlatformResourcesPathHandlerCreationParams params) : super( - params is AndroidResourcesPathHandlerCreationParams - ? params - : AndroidResourcesPathHandlerCreationParams - .fromPlatformResourcesPathHandlerCreationParams(params), - ); + params is AndroidResourcesPathHandlerCreationParams + ? params + : AndroidResourcesPathHandlerCreationParams + .fromPlatformResourcesPathHandlerCreationParams(params), + ); } /// Object specifying creation parameters for creating a [AndroidInternalStoragePathHandler]. @@ -182,10 +183,10 @@ class AndroidInternalStoragePathHandlerCreationParams extends PlatformInternalStoragePathHandlerCreationParams { /// Creates a new [AndroidInternalStoragePathHandlerCreationParams] instance. AndroidInternalStoragePathHandlerCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformInternalStoragePathHandlerCreationParams params, - ) : super(params, directory: params.directory); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformInternalStoragePathHandlerCreationParams params, + ) : super(params, directory: params.directory); /// Creates a [AndroidInternalStoragePathHandlerCreationParams] instance based on [PlatformInternalStoragePathHandlerCreationParams]. factory AndroidInternalStoragePathHandlerCreationParams.fromPlatformInternalStoragePathHandlerCreationParams( @@ -212,15 +213,17 @@ class AndroidInternalStoragePathHandlerCreationParams ///[guessContentTypeFromName](https://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName-java.lang.String-). ///Developers should ensure that asset files are named using standard file extensions. ///If the file does not have a recognised extension, `text/plain` will be used by default. -class AndroidInternalStoragePathHandler extends AndroidPathHandler implements PlatformInternalStoragePathHandler { +class AndroidInternalStoragePathHandler extends AndroidPathHandler + implements PlatformInternalStoragePathHandler { /// Constructs a [AndroidInternalStoragePathHandler]. - AndroidInternalStoragePathHandler(PlatformInternalStoragePathHandlerCreationParams params) + AndroidInternalStoragePathHandler( + PlatformInternalStoragePathHandlerCreationParams params) : super( - params is AndroidInternalStoragePathHandlerCreationParams - ? params - : AndroidInternalStoragePathHandlerCreationParams - .fromPlatformInternalStoragePathHandlerCreationParams(params), - ); + params is AndroidInternalStoragePathHandlerCreationParams + ? params + : AndroidInternalStoragePathHandlerCreationParams + .fromPlatformInternalStoragePathHandlerCreationParams(params), + ); AndroidInternalStoragePathHandlerCreationParams get _internalParams => params as AndroidInternalStoragePathHandlerCreationParams; @@ -230,9 +233,6 @@ class AndroidInternalStoragePathHandler extends AndroidPathHandler implements Pl @override Map toMap() { - return { - ...toMap(), - 'directory': directory - }; + return {...toMap(), 'directory': directory}; } } diff --git a/flutter_inappwebview_platform_interface/lib/flutter_inappwebview_platform_interface.dart b/flutter_inappwebview_platform_interface/lib/flutter_inappwebview_platform_interface.dart index 0af8b5b2..2367b0f2 100644 --- a/flutter_inappwebview_platform_interface/lib/flutter_inappwebview_platform_interface.dart +++ b/flutter_inappwebview_platform_interface/lib/flutter_inappwebview_platform_interface.dart @@ -1,3 +1,3 @@ library flutter_inappwebview_platform_interface; -export 'src/main.dart'; \ No newline at end of file +export 'src/main.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/chrome_safari_browser/platform_chrome_safari_browser.dart b/flutter_inappwebview_platform_interface/lib/src/chrome_safari_browser/platform_chrome_safari_browser.dart index 9c464028..e0c09869 100755 --- a/flutter_inappwebview_platform_interface/lib/src/chrome_safari_browser/platform_chrome_safari_browser.dart +++ b/flutter_inappwebview_platform_interface/lib/src/chrome_safari_browser/platform_chrome_safari_browser.dart @@ -24,7 +24,8 @@ class PlatformChromeSafariBrowserCreationParams { ///**Supported Platforms/Implementations**: ///- Android ///- iOS -abstract class PlatformChromeSafariBrowser extends PlatformInterface implements Disposable { +abstract class PlatformChromeSafariBrowser extends PlatformInterface + implements Disposable { ///Debug settings. static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); @@ -35,21 +36,22 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements ///View ID used internally. ///@{endtemplate} String get id { - throw UnimplementedError( - 'id is not implemented on the current platform'); + throw UnimplementedError('id is not implemented on the current platform'); } /// Creates a new [PlatformChromeSafariBrowser] - factory PlatformChromeSafariBrowser(PlatformChromeSafariBrowserCreationParams params) { + factory PlatformChromeSafariBrowser( + PlatformChromeSafariBrowserCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); - final PlatformChromeSafariBrowser chromeSafariBrowser = - InAppWebViewPlatform.instance!.createPlatformChromeSafariBrowser(params); + final PlatformChromeSafariBrowser chromeSafariBrowser = InAppWebViewPlatform + .instance! + .createPlatformChromeSafariBrowser(params); PlatformInterface.verify(chromeSafariBrowser, _token); return chromeSafariBrowser; } @@ -57,14 +59,15 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements /// Creates a new [PlatformChromeSafariBrowser] to access static methods. factory PlatformChromeSafariBrowser.static() { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformChromeSafariBrowser chromeSafariBrowserStatic = - InAppWebViewPlatform.instance!.createPlatformChromeSafariBrowserStatic(); + InAppWebViewPlatform.instance! + .createPlatformChromeSafariBrowserStatic(); PlatformInterface.verify(chromeSafariBrowserStatic, _token); return chromeSafariBrowserStatic; } @@ -74,7 +77,8 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformChromeSafariBrowser.implementation(this.params) : super(token: _token); + PlatformChromeSafariBrowser.implementation(this.params) + : super(token: _token); static final Object _token = Object(); @@ -100,16 +104,16 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements ///**Supported Platforms/Implementations**: ///- Android ///- iOS - Future open({WebUri? url, - Map? headers, - List? otherLikelyURLs, - WebUri? referrer, - @Deprecated('Use settings instead') - // ignore: deprecated_member_use_from_same_package - ChromeSafariBrowserClassOptions? options, - ChromeSafariBrowserSettings? settings}) { - throw UnimplementedError( - 'open is not implemented on the current platform'); + Future open( + {WebUri? url, + Map? headers, + List? otherLikelyURLs, + WebUri? referrer, + @Deprecated('Use settings instead') + // ignore: deprecated_member_use_from_same_package + ChromeSafariBrowserClassOptions? options, + ChromeSafariBrowserSettings? settings}) { + throw UnimplementedError('open is not implemented on the current platform'); } ///Tells the browser to launch with [url]. @@ -148,8 +152,7 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements /// ///**Supported Platforms/Implementations**: ///- Android ([Official API - CustomTabsSession.mayLaunchUrl](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#mayLaunchUrl(android.net.Uri,android.os.Bundle,java.util.List%3Candroid.os.Bundle%3E))) - Future mayLaunchUrl( - {WebUri? url, List? otherLikelyURLs}) { + Future mayLaunchUrl({WebUri? url, List? otherLikelyURLs}) { throw UnimplementedError( 'mayLaunchUrl is not implemented on the current platform'); } @@ -170,8 +173,8 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements /// ///**Supported Platforms/Implementations**: ///- Android ([Official API - CustomTabsSession.validateRelationship](https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle))) - Future validateRelationship({required CustomTabsRelationType relation, - required WebUri origin}) { + Future validateRelationship( + {required CustomTabsRelationType relation, required WebUri origin}) { throw UnimplementedError( 'validateRelationship is not implemented on the current platform'); } @@ -405,8 +408,7 @@ abstract class PlatformChromeSafariBrowser extends PlatformInterface implements /// ///**Supported Platforms/Implementations**: ///- iOS ([Official API - SFSafariViewController.prewarmConnections](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller/3752133-prewarmconnections)) - Future invalidatePrewarmingToken( - PrewarmingToken prewarmingToken) { + Future invalidatePrewarmingToken(PrewarmingToken prewarmingToken) { throw UnimplementedError( 'invalidatePrewarmingToken is not implemented on the current platform'); } diff --git a/flutter_inappwebview_platform_interface/lib/src/find_interaction/platform_find_interaction_controller.dart b/flutter_inappwebview_platform_interface/lib/src/find_interaction/platform_find_interaction_controller.dart index 9b5a1047..f53d2e11 100644 --- a/flutter_inappwebview_platform_interface/lib/src/find_interaction/platform_find_interaction_controller.dart +++ b/flutter_inappwebview_platform_interface/lib/src/find_interaction/platform_find_interaction_controller.dart @@ -28,7 +28,8 @@ class PlatformFindInteractionControllerCreationParams { ///- Android native WebView ///- iOS ///- MacOS -abstract class PlatformFindInteractionController extends PlatformInterface implements Disposable { +abstract class PlatformFindInteractionController extends PlatformInterface + implements Disposable { ///Debug settings. static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); @@ -36,14 +37,15 @@ abstract class PlatformFindInteractionController extends PlatformInterface imple factory PlatformFindInteractionController( PlatformFindInteractionControllerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformFindInteractionController webViewControllerDelegate = - InAppWebViewPlatform.instance!.createPlatformFindInteractionController(params); + InAppWebViewPlatform.instance! + .createPlatformFindInteractionController(params); PlatformInterface.verify(webViewControllerDelegate, _token); return webViewControllerDelegate; } @@ -53,7 +55,8 @@ abstract class PlatformFindInteractionController extends PlatformInterface imple /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformFindInteractionController.implementation(this.params) : super(token: _token); + PlatformFindInteractionController.implementation(this.params) + : super(token: _token); static final Object _token = Object(); @@ -77,11 +80,9 @@ abstract class PlatformFindInteractionController extends PlatformInterface imple ///- iOS ///- MacOS ///{@endtemplate} - void Function( - PlatformFindInteractionController controller, - int activeMatchOrdinal, - int numberOfMatches, - bool isDoneCounting)? get onFindResultReceived => params.onFindResultReceived; + void Function(PlatformFindInteractionController controller, + int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)? + get onFindResultReceived => params.onFindResultReceived; ///Finds all instances of find on the page and highlights them. Notifies [PlatformFindInteractionController.onFindResultReceived] listener. /// diff --git a/flutter_inappwebview_platform_interface/lib/src/in_app_browser/platform_in_app_browser.dart b/flutter_inappwebview_platform_interface/lib/src/in_app_browser/platform_in_app_browser.dart index 66ad5934..52cc0a49 100755 --- a/flutter_inappwebview_platform_interface/lib/src/in_app_browser/platform_in_app_browser.dart +++ b/flutter_inappwebview_platform_interface/lib/src/in_app_browser/platform_in_app_browser.dart @@ -61,7 +61,8 @@ class PlatformInAppBrowserCreationParams { ///- Android native WebView ///- iOS ///- MacOS -abstract class PlatformInAppBrowser extends PlatformInterface implements Disposable { +abstract class PlatformInAppBrowser extends PlatformInterface + implements Disposable { ///Debug settings. static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); @@ -81,17 +82,20 @@ abstract class PlatformInAppBrowser extends PlatformInterface implements Disposa ///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.pullToRefreshController} ///Represents the pull-to-refresh feature controller. ///@{endtemplate} - PlatformPullToRefreshController? get pullToRefreshController => params.pullToRefreshController; + PlatformPullToRefreshController? get pullToRefreshController => + params.pullToRefreshController; ///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.findInteractionController} ///Represents the find interaction feature controller. ///@{endtemplate} - PlatformFindInteractionController? get findInteractionController => params.findInteractionController; + PlatformFindInteractionController? get findInteractionController => + params.findInteractionController; ///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.initialUserScripts} ///Initial list of user scripts to be loaded at start or end of a page loading. ///@{endtemplate} - UnmodifiableListView? get initialUserScripts => params.initialUserScripts; + UnmodifiableListView? get initialUserScripts => + params.initialUserScripts; ///{@template flutter_inappwebview_platform_interface.PlatformInAppBrowser.windowId} ///The window id of a [CreateWindowAction.windowId]. @@ -980,7 +984,7 @@ abstract class PlatformInAppBrowserEvents { ///Use [onGeolocationPermissionsShowPrompt] instead. @Deprecated("Use onGeolocationPermissionsShowPrompt instead") Future? - androidOnGeolocationPermissionsShowPrompt(String origin) { + androidOnGeolocationPermissionsShowPrompt(String origin) { return null; } @@ -993,7 +997,7 @@ abstract class PlatformInAppBrowserEvents { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsShowPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsShowPrompt(java.lang.String,%20android.webkit.GeolocationPermissions.Callback))) Future? - onGeolocationPermissionsShowPrompt(String origin) { + onGeolocationPermissionsShowPrompt(String origin) { return null; } @@ -1281,9 +1285,9 @@ abstract class PlatformInAppBrowserEvents { ///- iOS ///- MacOS void onCameraCaptureStateChanged( - MediaCaptureState? oldState, - MediaCaptureState? newState, - ) {} + MediaCaptureState? oldState, + MediaCaptureState? newState, + ) {} ///Event fired when a change in the microphone capture state occurred. ///Event fired when a change in the microphone capture state occurred. @@ -1296,9 +1300,9 @@ abstract class PlatformInAppBrowserEvents { ///- iOS ///- MacOS void onMicrophoneCaptureStateChanged( - MediaCaptureState? oldState, - MediaCaptureState? newState, - ) {} + MediaCaptureState? oldState, + MediaCaptureState? newState, + ) {} ///Event fired when the content size of the `WebView` changes. /// @@ -1309,4 +1313,4 @@ abstract class PlatformInAppBrowserEvents { ///**Supported Platforms/Implementations**: ///- iOS void onContentSizeChanged(Size oldContentSize, Size newContentSize) {} -} \ No newline at end of file +} diff --git a/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_inappwebview_controller.dart b/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_inappwebview_controller.dart index 993d294d..edd2529e 100644 --- a/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_inappwebview_controller.dart +++ b/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_inappwebview_controller.dart @@ -47,7 +47,8 @@ class PlatformInAppWebViewControllerCreationParams { /// ///If you are using the [InAppWebView] widget, an [PlatformInAppWebViewController] instance can be obtained by setting the [InAppWebView.onWebViewCreated] ///callback. Instead, if you are using an [PlatformInAppBrowser] instance, you can get it through the [PlatformInAppBrowser.webViewController] attribute. -abstract class PlatformInAppWebViewController extends PlatformInterface implements Disposable { +abstract class PlatformInAppWebViewController extends PlatformInterface + implements Disposable { ///Debug settings used by [PlatformInAppWebViewWidget], [PlatformHeadlessInAppWebView] and [PlatformInAppBrowser]. ///The default value excludes the [WebView.onScrollChanged], [WebView.onOverScrolled] and [WebView.onReceivedIcon] events. static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings( @@ -78,14 +79,15 @@ abstract class PlatformInAppWebViewController extends PlatformInterface implemen /// Creates a new [PlatformInAppWebViewController] to access static methods. factory PlatformInAppWebViewController.static() { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformInAppWebViewController inAppWebViewControllerStatic = - InAppWebViewPlatform.instance!.createPlatformInAppWebViewControllerStatic(); + InAppWebViewPlatform.instance! + .createPlatformInAppWebViewControllerStatic(); PlatformInterface.verify(inAppWebViewControllerStatic, _token); return inAppWebViewControllerStatic; } diff --git a/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_webview.dart b/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_webview.dart index 441a2a41..5365b5e6 100644 --- a/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_webview.dart +++ b/flutter_inappwebview_platform_interface/lib/src/in_app_webview/platform_webview.dart @@ -17,7 +17,8 @@ import '../print_job/main.dart'; ///Class that represents a WebView. Used by [InAppWebView], [HeadlessInAppWebView] and the WebView of [PlatformInAppBrowser]. ///{@endtemplate} class PlatformWebViewCreationParams { - final T Function(PlatformInAppWebViewController controller)? controllerFromPlatform; + final T Function(PlatformInAppWebViewController controller)? + controllerFromPlatform; ///{@template flutter_inappwebview.WebView.windowId} ///The window id of a [CreateWindowAction.windowId]. @@ -54,8 +55,7 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455621-webview)) ///- Web ///{@endtemplate} - final void Function(T controller, WebUri? url)? - onLoadStart; + final void Function(T controller, WebUri? url)? onLoadStart; ///{@template flutter_inappwebview.WebView.onLoadStop} ///Event fired when the `WebView` finishes loading an [url]. @@ -69,13 +69,12 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455629-webview)) ///- Web ([Official API - Window.onload](https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event)) ///{@endtemplate} - final void Function(T controller, WebUri? url)? - onLoadStop; + final void Function(T controller, WebUri? url)? onLoadStop; ///Use [onReceivedError] instead. @Deprecated("Use onReceivedError instead") - final void Function(T controller, Uri? url, int code, - String message)? onLoadError; + final void Function(T controller, Uri? url, int code, String message)? + onLoadError; ///{@template flutter_inappwebview.WebView.onReceivedError} ///Event fired when the `WebView` encounters an [error] loading a [request]. @@ -85,13 +84,15 @@ class PlatformWebViewCreationParams { ///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview)) ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455623-webview)) ///{@endtemplate} - final void Function(T controller, - WebResourceRequest request, WebResourceError error)? onReceivedError; + final void Function( + T controller, WebResourceRequest request, WebResourceError error)? + onReceivedError; ///Use [onReceivedHttpError] instead. @Deprecated("Use onReceivedHttpError instead") - final void Function(T controller, Uri? url, - int statusCode, String description)? onLoadHttpError; + final void Function( + T controller, Uri? url, int statusCode, String description)? + onLoadHttpError; ///{@template flutter_inappwebview.WebView.onReceivedHttpError} ///Event fired when the `WebView` receives an HTTP error. @@ -107,9 +108,7 @@ class PlatformWebViewCreationParams { ///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview)) ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview)) ///{@endtemplate} - final void Function( - T controller, - WebResourceRequest request, + final void Function(T controller, WebResourceRequest request, WebResourceResponse errorResponse)? onReceivedHttpError; ///{@template flutter_inappwebview.WebView.onProgressChanged} @@ -120,8 +119,7 @@ class PlatformWebViewCreationParams { ///- iOS ///- MacOS ///{@endtemplate} - final void Function(T controller, int progress)? - onProgressChanged; + final void Function(T controller, int progress)? onProgressChanged; ///{@template flutter_inappwebview.WebView.onConsoleMessage} ///Event fired when the `WebView` receives a [ConsoleMessage]. @@ -134,8 +132,7 @@ class PlatformWebViewCreationParams { ///- MacOS ///- Web ///{@endtemplate} - final void Function( - T controller, ConsoleMessage consoleMessage)? + final void Function(T controller, ConsoleMessage consoleMessage)? onConsoleMessage; ///{@template flutter_inappwebview.WebView.shouldOverrideUrlLoading} @@ -171,9 +168,7 @@ class PlatformWebViewCreationParams { ///- iOS ///- MacOS ///{@endtemplate} - final void Function( - T controller, LoadedResource resource)? - onLoadResource; + final void Function(T controller, LoadedResource resource)? onLoadResource; ///{@template flutter_inappwebview.WebView.onScrollChanged} ///Event fired when the `WebView` scrolls. @@ -192,13 +187,11 @@ class PlatformWebViewCreationParams { ///- Web ([Official API - Window.onscroll](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onscroll)) ///- MacOS ///{@endtemplate} - final void Function(T controller, int x, int y)? - onScrollChanged; + final void Function(T controller, int x, int y)? onScrollChanged; ///Use [onDownloadStartRequest] instead @Deprecated('Use onDownloadStartRequest instead') - final void Function(T controller, Uri url)? - onDownloadStart; + final void Function(T controller, Uri url)? onDownloadStart; ///{@template flutter_inappwebview.WebView.onDownloadStartRequest} ///Event fired when `WebView` recognizes a downloadable file. @@ -213,13 +206,13 @@ class PlatformWebViewCreationParams { ///- iOS ///- MacOS ///{@endtemplate} - final void Function(T controller, - DownloadStartRequest downloadStartRequest)? onDownloadStartRequest; + final void Function(T controller, DownloadStartRequest downloadStartRequest)? + onDownloadStartRequest; ///Use [onLoadResourceWithCustomScheme] instead. @Deprecated('Use onLoadResourceWithCustomScheme instead') - final Future Function( - T controller, Uri url)? onLoadResourceCustomScheme; + final Future Function(T controller, Uri url)? + onLoadResourceCustomScheme; ///{@template flutter_inappwebview.WebView.onLoadResourceWithCustomScheme} ///Event fired when the `WebView` finds the `custom-scheme` while loading a resource. @@ -231,8 +224,7 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkurlschemehandler)) ///{@endtemplate} final Future Function( - T controller, WebResourceRequest request)? - onLoadResourceWithCustomScheme; + T controller, WebResourceRequest request)? onLoadResourceWithCustomScheme; ///{@template flutter_inappwebview.WebView.onCreateWindow} ///Event fired when the `WebView` requests the host application to create a new window, @@ -273,8 +265,8 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536907-webview)) ///- Web ///{@endtemplate} - final Future Function(T controller, - CreateWindowAction createWindowAction)? onCreateWindow; + final Future Function( + T controller, CreateWindowAction createWindowAction)? onCreateWindow; ///{@template flutter_inappwebview.WebView.onCloseWindow} ///Event fired when the host application should close the given WebView and remove it from the view system if necessary. @@ -327,8 +319,7 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview)) ///{@endtemplate} final Future Function( - T controller, JsAlertRequest jsAlertRequest)? - onJsAlert; + T controller, JsAlertRequest jsAlertRequest)? onJsAlert; ///{@template flutter_inappwebview.WebView.onJsConfirm} ///Event fired when javascript calls the `confirm()` method to display a confirm dialog. @@ -342,8 +333,7 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview)) ///{@endtemplate} final Future Function( - T controller, JsConfirmRequest jsConfirmRequest)? - onJsConfirm; + T controller, JsConfirmRequest jsConfirmRequest)? onJsConfirm; ///{@template flutter_inappwebview.WebView.onJsPrompt} ///Event fired when javascript calls the `prompt()` method to display a prompt dialog. @@ -357,8 +347,7 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKUIDelegate.webView](https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview)) ///{@endtemplate} final Future Function( - T controller, JsPromptRequest jsPromptRequest)? - onJsPrompt; + T controller, JsPromptRequest jsPromptRequest)? onJsPrompt; ///{@template flutter_inappwebview.WebView.onReceivedHttpAuthRequest} ///Event fired when the WebView received an HTTP authentication request. The default behavior is to cancel the request. @@ -370,8 +359,9 @@ class PlatformWebViewCreationParams { ///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview)) ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview)) ///{@endtemplate} - final Future Function(T controller, - HttpAuthenticationChallenge challenge)? onReceivedHttpAuthRequest; + final Future Function( + T controller, HttpAuthenticationChallenge challenge)? + onReceivedHttpAuthRequest; ///{@template flutter_inappwebview.WebView.onReceivedServerTrustAuthRequest} ///Event fired when the WebView need to perform server trust authentication (certificate validation). @@ -402,13 +392,12 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455638-webview)) ///{@endtemplate} final Future Function( - T controller, ClientCertChallenge challenge)? - onReceivedClientCertRequest; + T controller, ClientCertChallenge challenge)? onReceivedClientCertRequest; ///Use [FindInteractionController.onFindResultReceived] instead. @Deprecated('Use FindInteractionController.onFindResultReceived instead') - final void Function(T controller, int activeMatchOrdinal, - int numberOfMatches, bool isDoneCounting)? onFindResultReceived; + final void Function(T controller, int activeMatchOrdinal, int numberOfMatches, + bool isDoneCounting)? onFindResultReceived; ///{@template flutter_inappwebview.WebView.shouldInterceptAjaxRequest} ///Event fired when an `XMLHttpRequest` is sent to a server. @@ -427,8 +416,7 @@ class PlatformWebViewCreationParams { ///- iOS ///- MacOS ///{@endtemplate} - final Future Function( - T controller, AjaxRequest ajaxRequest)? + final Future Function(T controller, AjaxRequest ajaxRequest)? shouldInterceptAjaxRequest; ///{@template flutter_inappwebview.WebView.onAjaxReadyStateChange} @@ -449,8 +437,7 @@ class PlatformWebViewCreationParams { ///- MacOS ///{@endtemplate} final Future Function( - T controller, AjaxRequest ajaxRequest)? - onAjaxReadyStateChange; + T controller, AjaxRequest ajaxRequest)? onAjaxReadyStateChange; ///{@template flutter_inappwebview.WebView.onAjaxProgress} ///Event fired as an `XMLHttpRequest` progress. @@ -470,8 +457,7 @@ class PlatformWebViewCreationParams { ///- MacOS ///{@endtemplate} final Future Function( - T controller, AjaxRequest ajaxRequest)? - onAjaxProgress; + T controller, AjaxRequest ajaxRequest)? onAjaxProgress; ///{@template flutter_inappwebview.WebView.shouldInterceptFetchRequest} ///Event fired when a request is sent to a server through [Fetch API](https://developer.mozilla.org/it/docs/Web/API/Fetch_API). @@ -490,8 +476,7 @@ class PlatformWebViewCreationParams { ///- iOS ///- MacOS ///{@endtemplate} - final Future Function( - T controller, FetchRequest fetchRequest)? + final Future Function(T controller, FetchRequest fetchRequest)? shouldInterceptFetchRequest; ///{@template flutter_inappwebview.WebView.onUpdateVisitedHistory} @@ -512,8 +497,7 @@ class PlatformWebViewCreationParams { ///- MacOS ///- Web ///{@endtemplate} - final void Function( - T controller, WebUri? url, bool? isReload)? + final void Function(T controller, WebUri? url, bool? isReload)? onUpdateVisitedHistory; ///Use [onPrintRequest] instead @@ -550,8 +534,8 @@ class PlatformWebViewCreationParams { ///- Android native WebView ([Official API - View.setOnLongClickListener](https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener))) ///- iOS ([Official API - UILongPressGestureRecognizer](https://developer.apple.com/documentation/uikit/uilongpressgesturerecognizer)) ///{@endtemplate} - final void Function(T controller, - InAppWebViewHitTestResult hitTestResult)? onLongPressHitTestResult; + final void Function(T controller, InAppWebViewHitTestResult hitTestResult)? + onLongPressHitTestResult; ///{@template flutter_inappwebview.WebView.onEnterFullscreen} ///Event fired when the current page has entered full screen mode. @@ -592,8 +576,7 @@ class PlatformWebViewCreationParams { ///- iOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview)) ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455635-webview)) ///{@endtemplate} - final void Function(T controller, WebUri? url)? - onPageCommitVisible; + final void Function(T controller, WebUri? url)? onPageCommitVisible; ///{@template flutter_inappwebview.WebView.onTitleChanged} ///Event fired when a change in the document title occurred. @@ -608,8 +591,7 @@ class PlatformWebViewCreationParams { ///- MacOS ///- Web ///{@endtemplate} - final void Function(T controller, String? title)? - onTitleChanged; + final void Function(T controller, String? title)? onTitleChanged; ///{@template flutter_inappwebview.WebView.onOverScrolled} ///Event fired to respond to the results of an over-scroll operation. @@ -626,8 +608,8 @@ class PlatformWebViewCreationParams { ///- Android native WebView ([Official API - WebView.onOverScrolled](https://developer.android.com/reference/android/webkit/WebView#onOverScrolled(int,%20int,%20boolean,%20boolean))) ///- iOS ///{@endtemplate} - final void Function(T controller, int x, int y, - bool clampedX, bool clampedY)? onOverScrolled; + final void Function(T controller, int x, int y, bool clampedX, bool clampedY)? + onOverScrolled; ///{@template flutter_inappwebview.WebView.onZoomScaleChanged} ///Event fired when the zoom scale of the WebView has changed. @@ -643,16 +625,14 @@ class PlatformWebViewCreationParams { ///- iOS ([Official API - UIScrollViewDelegate.scrollViewDidZoom](https://developer.apple.com/documentation/uikit/uiscrollviewdelegate/1619409-scrollviewdidzoom)) ///- Web ///{@endtemplate} - final void Function( - T controller, double oldScale, double newScale)? + final void Function(T controller, double oldScale, double newScale)? onZoomScaleChanged; ///Use [onSafeBrowsingHit] instead. @Deprecated("Use onSafeBrowsingHit instead") final Future Function( - T controller, - Uri url, - SafeBrowsingThreat? threatType)? androidOnSafeBrowsingHit; + T controller, Uri url, SafeBrowsingThreat? threatType)? + androidOnSafeBrowsingHit; ///{@template flutter_inappwebview.WebView.onSafeBrowsingHit} ///Event fired when the webview notifies that a loading URL has been flagged by Safe Browsing. @@ -668,16 +648,14 @@ class PlatformWebViewCreationParams { ///- Android native WebView ([Official API - WebViewClient.onSafeBrowsingHit](https://developer.android.com/reference/android/webkit/WebViewClient#onSafeBrowsingHit(android.webkit.WebView,%20android.webkit.WebResourceRequest,%20int,%20android.webkit.SafeBrowsingResponse))) ///{@endtemplate} final Future Function( - T controller, - WebUri url, - SafeBrowsingThreat? threatType)? onSafeBrowsingHit; + T controller, WebUri url, SafeBrowsingThreat? threatType)? + onSafeBrowsingHit; ///Use [onPermissionRequest] instead. @Deprecated("Use onPermissionRequest instead") final Future Function( - T controller, - String origin, - List resources)? androidOnPermissionRequest; + T controller, String origin, List resources)? + androidOnPermissionRequest; ///{@template flutter_inappwebview.WebView.onPermissionRequest} ///Event fired when the WebView is requesting permission to access the specified resources and the permission currently isn't granted or denied. @@ -696,14 +674,13 @@ class PlatformWebViewCreationParams { ///- iOS ///- MacOS ///{@endtemplate} - final Future Function(T controller, - PermissionRequest permissionRequest)? onPermissionRequest; + final Future Function( + T controller, PermissionRequest permissionRequest)? onPermissionRequest; ///Use [onGeolocationPermissionsShowPrompt] instead. @Deprecated("Use onGeolocationPermissionsShowPrompt instead") final Future Function( - T controller, String origin)? - androidOnGeolocationPermissionsShowPrompt; + T controller, String origin)? androidOnGeolocationPermissionsShowPrompt; ///{@template flutter_inappwebview.WebView.onGeolocationPermissionsShowPrompt} ///Event that notifies the host application that web content from the specified origin is attempting to use the Geolocation API, but no permission state is currently set for that origin. @@ -716,13 +693,11 @@ class PlatformWebViewCreationParams { ///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsShowPrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsShowPrompt(java.lang.String,%20android.webkit.GeolocationPermissions.Callback))) ///{@endtemplate} final Future Function( - T controller, String origin)? - onGeolocationPermissionsShowPrompt; + T controller, String origin)? onGeolocationPermissionsShowPrompt; ///Use [onGeolocationPermissionsHidePrompt] instead. @Deprecated("Use onGeolocationPermissionsHidePrompt instead") - final void Function(T controller)? - androidOnGeolocationPermissionsHidePrompt; + final void Function(T controller)? androidOnGeolocationPermissionsHidePrompt; ///{@template flutter_inappwebview.WebView.onGeolocationPermissionsHidePrompt} ///Notify the host application that a request for Geolocation permissions, made with a previous call to [onGeolocationPermissionsShowPrompt] has been canceled. @@ -731,14 +706,12 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebChromeClient.onGeolocationPermissionsHidePrompt](https://developer.android.com/reference/android/webkit/WebChromeClient#onGeolocationPermissionsHidePrompt())) ///{@endtemplate} - final void Function(T controller)? - onGeolocationPermissionsHidePrompt; + final void Function(T controller)? onGeolocationPermissionsHidePrompt; ///Use [shouldInterceptRequest] instead. @Deprecated("Use shouldInterceptRequest instead") final Future Function( - T controller, WebResourceRequest request)? - androidShouldInterceptRequest; + T controller, WebResourceRequest request)? androidShouldInterceptRequest; ///{@template flutter_inappwebview.WebView.shouldInterceptRequest} ///Notify the host application of a resource request and allow the application to return the data. @@ -759,13 +732,11 @@ class PlatformWebViewCreationParams { ///- Android native WebView ([Official API - WebViewClient.shouldInterceptRequest](https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest))) ///{@endtemplate} final Future Function( - T controller, WebResourceRequest request)? - shouldInterceptRequest; + T controller, WebResourceRequest request)? shouldInterceptRequest; ///Use [onRenderProcessUnresponsive] instead. @Deprecated("Use onRenderProcessUnresponsive instead") - final Future Function( - T controller, Uri? url)? + final Future Function(T controller, Uri? url)? androidOnRenderProcessUnresponsive; ///{@template flutter_inappwebview.WebView.onRenderProcessUnresponsive} @@ -789,14 +760,12 @@ class PlatformWebViewCreationParams { ///**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))) ///{@endtemplate} - final Future Function( - T controller, WebUri? url)? + final Future Function(T controller, WebUri? url)? onRenderProcessUnresponsive; ///Use [onRenderProcessResponsive] instead. @Deprecated("Use onRenderProcessResponsive instead") - final Future Function( - T controller, Uri? url)? + final Future Function(T controller, Uri? url)? androidOnRenderProcessResponsive; ///{@template flutter_inappwebview.WebView.onRenderProcessResponsive} @@ -813,14 +782,12 @@ class PlatformWebViewCreationParams { ///**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))) ///{@endtemplate} - final Future Function( - T controller, WebUri? url)? + final Future Function(T controller, WebUri? url)? onRenderProcessResponsive; ///Use [onRenderProcessGone] instead. @Deprecated("Use onRenderProcessGone instead") - final void Function( - T controller, RenderProcessGoneDetail detail)? + final void Function(T controller, RenderProcessGoneDetail detail)? androidOnRenderProcessGone; ///{@template flutter_inappwebview.WebView.onRenderProcessGone} @@ -835,14 +802,13 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebViewClient.onRenderProcessGone](https://developer.android.com/reference/android/webkit/WebViewClient#onRenderProcessGone(android.webkit.WebView,%20android.webkit.RenderProcessGoneDetail))) ///{@endtemplate} - final void Function( - T controller, RenderProcessGoneDetail detail)? + final void Function(T controller, RenderProcessGoneDetail detail)? onRenderProcessGone; ///Use [onFormResubmission] instead. @Deprecated('Use onFormResubmission instead') - final Future Function( - T controller, Uri? url)? androidOnFormResubmission; + final Future Function(T controller, Uri? url)? + androidOnFormResubmission; ///{@template flutter_inappwebview.WebView.onFormResubmission} ///As the host application if the browser should resend data as the requested page was a result of a POST. The default is to not resend the data. @@ -850,19 +816,17 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebViewClient.onFormResubmission](https://developer.android.com/reference/android/webkit/WebViewClient#onFormResubmission(android.webkit.WebView,%20android.os.Message,%20android.os.Message))) ///{@endtemplate} - final Future Function( - T controller, WebUri? url)? onFormResubmission; + final Future Function(T controller, WebUri? url)? + onFormResubmission; ///Use [onZoomScaleChanged] instead. @Deprecated('Use onZoomScaleChanged instead') - final void Function( - T controller, double oldScale, double newScale)? + final void Function(T controller, double oldScale, double newScale)? androidOnScaleChanged; ///Use [onReceivedIcon] instead. @Deprecated('Use onReceivedIcon instead') - final void Function(T controller, Uint8List icon)? - androidOnReceivedIcon; + final void Function(T controller, Uint8List icon)? androidOnReceivedIcon; ///{@template flutter_inappwebview.WebView.onReceivedIcon} ///Event fired when there is new favicon for the current page. @@ -872,13 +836,11 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebChromeClient.onReceivedIcon](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap))) ///{@endtemplate} - final void Function(T controller, Uint8List icon)? - onReceivedIcon; + final void Function(T controller, Uint8List icon)? onReceivedIcon; ///Use [onReceivedTouchIconUrl] instead. @Deprecated('Use onReceivedTouchIconUrl instead') - final void Function( - T controller, Uri url, bool precomposed)? + final void Function(T controller, Uri url, bool precomposed)? androidOnReceivedTouchIconUrl; ///{@template flutter_inappwebview.WebView.onReceivedTouchIconUrl} @@ -891,15 +853,14 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebChromeClient.onReceivedTouchIconUrl](https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean))) ///{@endtemplate} - final void Function( - T controller, WebUri url, bool precomposed)? + final void Function(T controller, WebUri url, bool precomposed)? onReceivedTouchIconUrl; ///Use [onJsBeforeUnload] instead. @Deprecated('Use onJsBeforeUnload instead') final Future Function( - T controller, - JsBeforeUnloadRequest jsBeforeUnloadRequest)? androidOnJsBeforeUnload; + T controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)? + androidOnJsBeforeUnload; ///{@template flutter_inappwebview.WebView.onJsBeforeUnload} ///Event fired when the client should display a dialog to confirm navigation away from the current page. @@ -916,13 +877,12 @@ class PlatformWebViewCreationParams { ///- Android native WebView ([Official API - WebChromeClient.onJsBeforeUnload](https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult))) ///{@endtemplate} final Future Function( - T controller, - JsBeforeUnloadRequest jsBeforeUnloadRequest)? onJsBeforeUnload; + T controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)? + onJsBeforeUnload; ///Use [onReceivedLoginRequest] instead. @Deprecated('Use onReceivedLoginRequest instead') - final void Function( - T controller, LoginRequest loginRequest)? + final void Function(T controller, LoginRequest loginRequest)? androidOnReceivedLoginRequest; ///{@template flutter_inappwebview.WebView.onReceivedLoginRequest} @@ -933,8 +893,7 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebViewClient.onReceivedLoginRequest](https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String))) ///{@endtemplate} - final void Function( - T controller, LoginRequest loginRequest)? + final void Function(T controller, LoginRequest loginRequest)? onReceivedLoginRequest; ///{@template flutter_inappwebview.WebView.onPermissionRequestCanceled} @@ -949,8 +908,8 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - WebChromeClient.onPermissionRequestCanceled](https://developer.android.com/reference/android/webkit/WebChromeClient#onPermissionRequestCanceled(android.webkit.PermissionRequest))) ///{@endtemplate} - final void Function(T controller, - PermissionRequest permissionRequest)? onPermissionRequestCanceled; + final void Function(T controller, PermissionRequest permissionRequest)? + onPermissionRequestCanceled; ///{@template flutter_inappwebview.WebView.onRequestFocus} ///Request display and focus for this WebView. @@ -963,8 +922,7 @@ class PlatformWebViewCreationParams { ///Use [onWebContentProcessDidTerminate] instead. @Deprecated('Use onWebContentProcessDidTerminate instead') - final void Function(T controller)? - iosOnWebContentProcessDidTerminate; + final void Function(T controller)? iosOnWebContentProcessDidTerminate; ///{@template flutter_inappwebview.WebView.onWebContentProcessDidTerminate} ///Invoked when the web view's web content process is terminated. @@ -973,8 +931,7 @@ class PlatformWebViewCreationParams { ///- iOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi)) ///- MacOS ([Official API - WKNavigationDelegate.webViewWebContentProcessDidTerminate](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi)) ///{@endtemplate} - final void Function(T controller)? - onWebContentProcessDidTerminate; + final void Function(T controller)? onWebContentProcessDidTerminate; ///Use [onDidReceiveServerRedirectForProvisionalNavigation] instead. @Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') @@ -994,8 +951,8 @@ class PlatformWebViewCreationParams { ///Use [onNavigationResponse] instead. @Deprecated('Use onNavigationResponse instead') final Future Function( - T controller, - IOSWKNavigationResponse navigationResponse)? iosOnNavigationResponse; + T controller, IOSWKNavigationResponse navigationResponse)? + iosOnNavigationResponse; ///{@template flutter_inappwebview.WebView.onNavigationResponse} ///Called when a web view asks for permission to navigate to new content after the response to the navigation request is known. @@ -1009,14 +966,14 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455643-webview)) ///{@endtemplate} final Future Function( - T controller, - NavigationResponse navigationResponse)? onNavigationResponse; + T controller, NavigationResponse navigationResponse)? + onNavigationResponse; ///Use [shouldAllowDeprecatedTLS] instead. @Deprecated('Use shouldAllowDeprecatedTLS instead') final Future Function( - T controller, - URLAuthenticationChallenge challenge)? iosShouldAllowDeprecatedTLS; + T controller, URLAuthenticationChallenge challenge)? + iosShouldAllowDeprecatedTLS; ///{@template flutter_inappwebview.WebView.shouldAllowDeprecatedTLS} ///Called when a web view asks whether to continue with a connection that uses a deprecated version of TLS (v1.0 and v1.1). @@ -1032,8 +989,8 @@ class PlatformWebViewCreationParams { ///- MacOS ([Official API - WKNavigationDelegate.webView](https://developer.apple.com/documentation/webkit/wknavigationdelegate/3601237-webview)) ///{@endtemplate} final Future Function( - T controller, - URLAuthenticationChallenge challenge)? shouldAllowDeprecatedTLS; + T controller, URLAuthenticationChallenge challenge)? + shouldAllowDeprecatedTLS; ///{@template flutter_inappwebview.WebView.onCameraCaptureStateChanged} ///Event fired when a change in the camera capture state occurred. @@ -1079,8 +1036,8 @@ class PlatformWebViewCreationParams { ///**Supported Platforms/Implementations**: ///- iOS ///{@endtemplate} - final void Function(T controller, Size oldContentSize, - Size newContentSize)? onContentSizeChanged; + final void Function(T controller, Size oldContentSize, Size newContentSize)? + onContentSizeChanged; ///{@template flutter_inappwebview.WebView.initialUrlRequest} ///Initial url request that will be loaded. @@ -1181,7 +1138,7 @@ class PlatformWebViewCreationParams { ///{@macro flutter_inappwebview.WebView} const PlatformWebViewCreationParams( {this.controllerFromPlatform, - this.windowId, + this.windowId, this.onWebViewCreated, this.onLoadStart, this.onLoadStop, diff --git a/flutter_inappwebview_platform_interface/lib/src/inappwebview_platform.dart b/flutter_inappwebview_platform_interface/lib/src/inappwebview_platform.dart index 7afddc8c..069e0e56 100644 --- a/flutter_inappwebview_platform_interface/lib/src/inappwebview_platform.dart +++ b/flutter_inappwebview_platform_interface/lib/src/inappwebview_platform.dart @@ -427,8 +427,8 @@ abstract class InAppWebViewPlatform extends PlatformInterface { /// This function should only be called by the app-facing package. /// Look at using [ChromeSafariBrowser] in `flutter_inappwebview` instead. PlatformChromeSafariBrowser createPlatformChromeSafariBrowser( - PlatformChromeSafariBrowserCreationParams params, - ) { + PlatformChromeSafariBrowserCreationParams params, + ) { throw UnimplementedError( 'createPlatformChromeSafariBrowser is not implemented on the current platform.'); } diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_cookie_manager.dart b/flutter_inappwebview_platform_interface/lib/src/platform_cookie_manager.dart index cb87a1da..63ac822d 100755 --- a/flutter_inappwebview_platform_interface/lib/src/platform_cookie_manager.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_cookie_manager.dart @@ -53,8 +53,7 @@ abstract class PlatformCookieManager extends PlatformInterface { /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformCookieManager.implementation(this.params) - : super(token: _token); + PlatformCookieManager.implementation(this.params) : super(token: _token); static final Object _token = Object(); diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_http_auth_credentials_database.dart b/flutter_inappwebview_platform_interface/lib/src/platform_http_auth_credentials_database.dart index f20c0283..35e08ebe 100755 --- a/flutter_inappwebview_platform_interface/lib/src/platform_http_auth_credentials_database.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_http_auth_credentials_database.dart @@ -27,16 +27,18 @@ class PlatformHttpAuthCredentialDatabaseCreationParams { ///- MacOS abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface { /// Creates a new [PlatformHttpAuthCredentialDatabase] - factory PlatformHttpAuthCredentialDatabase(PlatformHttpAuthCredentialDatabaseCreationParams params) { + factory PlatformHttpAuthCredentialDatabase( + PlatformHttpAuthCredentialDatabaseCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformHttpAuthCredentialDatabase cookieManager = - InAppWebViewPlatform.instance!.createPlatformHttpAuthCredentialDatabase(params); + InAppWebViewPlatform.instance! + .createPlatformHttpAuthCredentialDatabase(params); PlatformInterface.verify(cookieManager, _token); return cookieManager; } @@ -63,8 +65,7 @@ abstract class PlatformHttpAuthCredentialDatabase extends PlatformInterface { ///- Android native WebView ///- iOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials)) ///- MacOS ([Official API - URLCredentialStorage.allCredentials](https://developer.apple.com/documentation/foundation/urlcredentialstorage/1413859-allcredentials)) - Future> - getAllAuthCredentials() { + Future> getAllAuthCredentials() { throw UnimplementedError( 'getAllAuthCredentials is not implemented on the current platform'); } diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_in_app_localhost_server.dart b/flutter_inappwebview_platform_interface/lib/src/platform_in_app_localhost_server.dart index 9217e32e..f3eecc5f 100755 --- a/flutter_inappwebview_platform_interface/lib/src/platform_in_app_localhost_server.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_in_app_localhost_server.dart @@ -41,16 +41,18 @@ class PlatformInAppLocalhostServerCreationParams { ///- MacOS abstract class PlatformInAppLocalhostServer extends PlatformInterface { /// Creates a new [PlatformInAppLocalhostServer] - factory PlatformInAppLocalhostServer(PlatformInAppLocalhostServerCreationParams params) { + factory PlatformInAppLocalhostServer( + PlatformInAppLocalhostServerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformInAppLocalhostServer inAppLocalhostServer = - InAppWebViewPlatform.instance!.createPlatformInAppLocalhostServer(params); + InAppWebViewPlatform.instance! + .createPlatformInAppLocalhostServer(params); PlatformInterface.verify(inAppLocalhostServer, _token); return inAppLocalhostServer; } diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_process_global_config.dart b/flutter_inappwebview_platform_interface/lib/src/platform_process_global_config.dart index 5603d24a..33d7f26a 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_process_global_config.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_process_global_config.dart @@ -42,16 +42,18 @@ class PlatformProcessGlobalConfigCreationParams { ///- Android native WebView ([Official API - ProcessGlobalConfig](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig)) abstract class PlatformProcessGlobalConfig extends PlatformInterface { /// Creates a new [PlatformProcessGlobalConfig] - factory PlatformProcessGlobalConfig(PlatformProcessGlobalConfigCreationParams params) { + factory PlatformProcessGlobalConfig( + PlatformProcessGlobalConfigCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); - final PlatformProcessGlobalConfig processGlobalConfig = - InAppWebViewPlatform.instance!.createPlatformProcessGlobalConfig(params); + final PlatformProcessGlobalConfig processGlobalConfig = InAppWebViewPlatform + .instance! + .createPlatformProcessGlobalConfig(params); PlatformInterface.verify(processGlobalConfig, _token); return processGlobalConfig; } diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_proxy_controller.dart b/flutter_inappwebview_platform_interface/lib/src/platform_proxy_controller.dart index 2f0fe261..d6297550 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_proxy_controller.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_proxy_controller.dart @@ -30,16 +30,17 @@ class PlatformProxyControllerCreationParams { ///- Android native WebView ([Official API - ProxyController](https://developer.android.com/reference/androidx/webkit/ProxyController)) abstract class PlatformProxyController extends PlatformInterface { /// Creates a new [PlatformProxyController] - factory PlatformProxyController(PlatformProxyControllerCreationParams params) { + factory PlatformProxyController( + PlatformProxyControllerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformProxyController proxyController = - InAppWebViewPlatform.instance!.createPlatformProxyController(params); + InAppWebViewPlatform.instance!.createPlatformProxyController(params); PlatformInterface.verify(proxyController, _token); return proxyController; } @@ -50,8 +51,7 @@ abstract class PlatformProxyController extends PlatformInterface { /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformProxyController.implementation(this.params) - : super(token: _token); + PlatformProxyController.implementation(this.params) : super(token: _token); static final Object _token = Object(); diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_service_worker_controller.dart b/flutter_inappwebview_platform_interface/lib/src/platform_service_worker_controller.dart index f7d134bc..155f33cb 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_service_worker_controller.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_service_worker_controller.dart @@ -22,16 +22,18 @@ class PlatformServiceWorkerControllerCreationParams { ///- Android native WebView ([Official API - ServiceWorkerControllerCompat](https://developer.android.com/reference/androidx/webkit/ServiceWorkerControllerCompat)) abstract class PlatformServiceWorkerController extends PlatformInterface { /// Creates a new [PlatformServiceWorkerController] - factory PlatformServiceWorkerController(PlatformServiceWorkerControllerCreationParams params) { + factory PlatformServiceWorkerController( + PlatformServiceWorkerControllerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformServiceWorkerController serviceWorkerController = - InAppWebViewPlatform.instance!.createPlatformServiceWorkerController(params); + InAppWebViewPlatform.instance! + .createPlatformServiceWorkerController(params); PlatformInterface.verify(serviceWorkerController, _token); return serviceWorkerController; } @@ -39,14 +41,15 @@ abstract class PlatformServiceWorkerController extends PlatformInterface { /// Creates a new [PlatformServiceWorkerController] factory PlatformServiceWorkerController.static() { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformServiceWorkerController serviceWorkerControllerStatic = - InAppWebViewPlatform.instance!.createPlatformServiceWorkerControllerStatic(); + InAppWebViewPlatform.instance! + .createPlatformServiceWorkerControllerStatic(); PlatformInterface.verify(serviceWorkerControllerStatic, _token); return serviceWorkerControllerStatic; } @@ -188,4 +191,3 @@ class ServiceWorkerClient { ServiceWorkerClient({this.shouldInterceptRequest}); } - diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_tracing_controller.dart b/flutter_inappwebview_platform_interface/lib/src/platform_tracing_controller.dart index e0e185c7..c0b5b28c 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_tracing_controller.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_tracing_controller.dart @@ -29,16 +29,17 @@ class PlatformTracingControllerCreationParams { ///- Android native WebView ([Official API - TracingController](https://developer.android.com/reference/androidx/webkit/TracingController)) abstract class PlatformTracingController extends PlatformInterface { /// Creates a new [PlatformTracingController] - factory PlatformTracingController(PlatformTracingControllerCreationParams params) { + factory PlatformTracingController( + PlatformTracingControllerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformTracingController tracingController = - InAppWebViewPlatform.instance!.createPlatformTracingController(params); + InAppWebViewPlatform.instance!.createPlatformTracingController(params); PlatformInterface.verify(tracingController, _token); return tracingController; } @@ -49,8 +50,7 @@ abstract class PlatformTracingController extends PlatformInterface { /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformTracingController.implementation(this.params) - : super(token: _token); + PlatformTracingController.implementation(this.params) : super(token: _token); static final Object _token = Object(); @@ -80,8 +80,7 @@ abstract class PlatformTracingController extends PlatformInterface { ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - TracingController.stop](https://developer.android.com/reference/android/webkit/TracingController#stop(java.io.OutputStream,%20java.util.concurrent.Executor))) Future stop({String? filePath}) { - throw UnimplementedError( - 'stop is not implemented on the current platform'); + throw UnimplementedError('stop is not implemented on the current platform'); } ///Returns whether the WebView framework is tracing. diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_webview_asset_loader.dart b/flutter_inappwebview_platform_interface/lib/src/platform_webview_asset_loader.dart index 4082cd9d..94fd8250 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_webview_asset_loader.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_webview_asset_loader.dart @@ -43,8 +43,7 @@ class WebViewAssetLoader_ { abstract class IPathHandler { String get path { - throw UnimplementedError( - 'path is not implemented on the current platform'); + throw UnimplementedError('path is not implemented on the current platform'); } Map toMap() { @@ -74,7 +73,8 @@ class PlatformPathHandlerCreationParams { ///A handler that produces responses for a registered path. /// ///Implement this interface to handle other use-cases according to your app's needs. -abstract class PlatformPathHandler extends PlatformInterface implements IPathHandler { +abstract class PlatformPathHandler extends PlatformInterface + implements IPathHandler { /// Creates a new [PlatformWebViewAssetLoader] factory PlatformPathHandler(PlatformPathHandlerCreationParams params) { assert( diff --git a/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.dart b/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.dart index 05fb46f8..552abb95 100644 --- a/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.dart +++ b/flutter_inappwebview_platform_interface/lib/src/platform_webview_feature.dart @@ -24,14 +24,14 @@ abstract class PlatformWebViewFeature extends PlatformInterface { /// Creates a new [PlatformWebViewFeature] factory PlatformWebViewFeature(PlatformWebViewFeatureCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformWebViewFeature webViewFeature = - InAppWebViewPlatform.instance!.createPlatformWebViewFeature(params); + InAppWebViewPlatform.instance!.createPlatformWebViewFeature(params); PlatformInterface.verify(webViewFeature, _token); return webViewFeature; } @@ -39,14 +39,14 @@ abstract class PlatformWebViewFeature extends PlatformInterface { /// Creates a new empty [PlatformWebViewFeature] to access static methods. factory PlatformWebViewFeature.static() { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`WebViewPlatform.instance` before use. For unit testing, ' - '`WebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`WebViewPlatform.instance` before use. For unit testing, ' + '`WebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformWebViewFeature webViewFeatureStatic = - InAppWebViewPlatform.instance!.createPlatformWebViewFeatureStatic(); + InAppWebViewPlatform.instance!.createPlatformWebViewFeatureStatic(); PlatformInterface.verify(webViewFeatureStatic, _token); return webViewFeatureStatic; } @@ -57,8 +57,7 @@ abstract class PlatformWebViewFeature extends PlatformInterface { /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformWebViewFeature.implementation(this.params) - : super(token: _token); + PlatformWebViewFeature.implementation(this.params) : super(token: _token); static final Object _token = Object(); @@ -98,8 +97,7 @@ abstract class PlatformWebViewFeature extends PlatformInterface { ///any callback guarded by that feature will not be invoked. /// ///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String) - Future isStartupFeatureSupported( - WebViewFeature startupFeature) { + Future isStartupFeatureSupported(WebViewFeature startupFeature) { throw UnimplementedError( 'isStartupFeatureSupported is not implemented on the current platform'); } @@ -121,216 +119,216 @@ class WebViewFeature_ { ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewController.createWebMessageChannel]. static const CREATE_WEB_MESSAGE_CHANNEL = - const WebViewFeature_._internal("CREATE_WEB_MESSAGE_CHANNEL"); + const WebViewFeature_._internal("CREATE_WEB_MESSAGE_CHANNEL"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.disabledActionModeMenuItems]. static const DISABLED_ACTION_MODE_MENU_ITEMS = - const WebViewFeature_._internal("DISABLED_ACTION_MODE_MENU_ITEMS"); + const WebViewFeature_._internal("DISABLED_ACTION_MODE_MENU_ITEMS"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.forceDark]. static const FORCE_DARK = const WebViewFeature_._internal("FORCE_DARK"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.forceDarkStrategy]. static const FORCE_DARK_STRATEGY = - const WebViewFeature_._internal("FORCE_DARK_STRATEGY"); + const WebViewFeature_._internal("FORCE_DARK_STRATEGY"); /// static const GET_WEB_CHROME_CLIENT = - const WebViewFeature_._internal("GET_WEB_CHROME_CLIENT"); + const WebViewFeature_._internal("GET_WEB_CHROME_CLIENT"); /// static const GET_WEB_VIEW_CLIENT = - const WebViewFeature_._internal("GET_WEB_VIEW_CLIENT"); + const WebViewFeature_._internal("GET_WEB_VIEW_CLIENT"); /// static const GET_WEB_VIEW_RENDERER = - const WebViewFeature_._internal("GET_WEB_VIEW_RENDERER"); + const WebViewFeature_._internal("GET_WEB_VIEW_RENDERER"); /// static const MULTI_PROCESS = const WebViewFeature_._internal("MULTI_PROCESS"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.offscreenPreRaster]. static const OFF_SCREEN_PRERASTER = - const WebViewFeature_._internal("OFF_SCREEN_PRERASTER"); + const WebViewFeature_._internal("OFF_SCREEN_PRERASTER"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewController.postWebMessage]. static const POST_WEB_MESSAGE = - const WebViewFeature_._internal("POST_WEB_MESSAGE"); + const WebViewFeature_._internal("POST_WEB_MESSAGE"); ///Feature for [isFeatureSupported]. This feature covers [ProxyController.setProxyOverride] and [ProxyController.clearProxyOverride]. static const PROXY_OVERRIDE = - const WebViewFeature_._internal("PROXY_OVERRIDE"); + const WebViewFeature_._internal("PROXY_OVERRIDE"); ///Feature for [isFeatureSupported]. This feature covers [ProxySettings.reverseBypassEnabled]. static const PROXY_OVERRIDE_REVERSE_BYPASS = - const WebViewFeature_._internal("PROXY_OVERRIDE_REVERSE_BYPASS"); + const WebViewFeature_._internal("PROXY_OVERRIDE_REVERSE_BYPASS"); /// static const RECEIVE_HTTP_ERROR = - const WebViewFeature_._internal("RECEIVE_HTTP_ERROR"); + const WebViewFeature_._internal("RECEIVE_HTTP_ERROR"); /// static const RECEIVE_WEB_RESOURCE_ERROR = - const WebViewFeature_._internal("RECEIVE_WEB_RESOURCE_ERROR"); + const WebViewFeature_._internal("RECEIVE_WEB_RESOURCE_ERROR"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewController.setSafeBrowsingAllowlist]. static const SAFE_BROWSING_ALLOWLIST = - const WebViewFeature_._internal("SAFE_BROWSING_ALLOWLIST"); + const WebViewFeature_._internal("SAFE_BROWSING_ALLOWLIST"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.safeBrowsingEnabled]. static const SAFE_BROWSING_ENABLE = - const WebViewFeature_._internal("SAFE_BROWSING_ENABLE"); + const WebViewFeature_._internal("SAFE_BROWSING_ENABLE"); /// static const SAFE_BROWSING_HIT = - const WebViewFeature_._internal("SAFE_BROWSING_HIT"); + const WebViewFeature_._internal("SAFE_BROWSING_HIT"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewController.getSafeBrowsingPrivacyPolicyUrl]. static const SAFE_BROWSING_PRIVACY_POLICY_URL = - const WebViewFeature_._internal("SAFE_BROWSING_PRIVACY_POLICY_URL"); + const WebViewFeature_._internal("SAFE_BROWSING_PRIVACY_POLICY_URL"); /// static const SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY = - const WebViewFeature_._internal("SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"); + const WebViewFeature_._internal("SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"); /// static const SAFE_BROWSING_RESPONSE_PROCEED = - const WebViewFeature_._internal("SAFE_BROWSING_RESPONSE_PROCEED"); + const WebViewFeature_._internal("SAFE_BROWSING_RESPONSE_PROCEED"); /// static const SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL = - const WebViewFeature_._internal( - "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"); + const WebViewFeature_._internal( + "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"); ///Use [SAFE_BROWSING_ALLOWLIST] instead. @Deprecated('Use SAFE_BROWSING_ALLOWLIST instead') static const SAFE_BROWSING_WHITELIST = - const WebViewFeature_._internal("SAFE_BROWSING_WHITELIST"); + const WebViewFeature_._internal("SAFE_BROWSING_WHITELIST"); ///Feature for [isFeatureSupported]. This feature covers [ServiceWorkerController]. static const SERVICE_WORKER_BASIC_USAGE = - const WebViewFeature_._internal("SERVICE_WORKER_BASIC_USAGE"); + const WebViewFeature_._internal("SERVICE_WORKER_BASIC_USAGE"); ///Feature for [isFeatureSupported]. This feature covers [ServiceWorkerController.setBlockNetworkLoads] and [ServiceWorkerController.getBlockNetworkLoads]. static const SERVICE_WORKER_BLOCK_NETWORK_LOADS = - const WebViewFeature_._internal("SERVICE_WORKER_BLOCK_NETWORK_LOADS"); + const WebViewFeature_._internal("SERVICE_WORKER_BLOCK_NETWORK_LOADS"); ///Feature for [isFeatureSupported]. This feature covers [ServiceWorkerController.setCacheMode] and [ServiceWorkerController.getCacheMode]. static const SERVICE_WORKER_CACHE_MODE = - const WebViewFeature_._internal("SERVICE_WORKER_CACHE_MODE"); + const WebViewFeature_._internal("SERVICE_WORKER_CACHE_MODE"); ///Feature for [isFeatureSupported]. This feature covers [ServiceWorkerController.setAllowContentAccess] and [ServiceWorkerController.getAllowContentAccess]. static const SERVICE_WORKER_CONTENT_ACCESS = - const WebViewFeature_._internal("SERVICE_WORKER_CONTENT_ACCESS"); + const WebViewFeature_._internal("SERVICE_WORKER_CONTENT_ACCESS"); ///Feature for [isFeatureSupported]. This feature covers [ServiceWorkerController.setAllowFileAccess] and [ServiceWorkerController.getAllowFileAccess]. static const SERVICE_WORKER_FILE_ACCESS = - const WebViewFeature_._internal("SERVICE_WORKER_FILE_ACCESS"); + const WebViewFeature_._internal("SERVICE_WORKER_FILE_ACCESS"); ///Feature for [isFeatureSupported]. This feature covers [ServiceWorkerClient.shouldInterceptRequest]. static const SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST = - const WebViewFeature_._internal( - "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"); + const WebViewFeature_._internal( + "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"); /// static const SHOULD_OVERRIDE_WITH_REDIRECTS = - const WebViewFeature_._internal("SHOULD_OVERRIDE_WITH_REDIRECTS"); + const WebViewFeature_._internal("SHOULD_OVERRIDE_WITH_REDIRECTS"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewController.startSafeBrowsing]. static const START_SAFE_BROWSING = - const WebViewFeature_._internal("START_SAFE_BROWSING"); + const WebViewFeature_._internal("START_SAFE_BROWSING"); /// static const TRACING_CONTROLLER_BASIC_USAGE = - const WebViewFeature_._internal("TRACING_CONTROLLER_BASIC_USAGE"); + const WebViewFeature_._internal("TRACING_CONTROLLER_BASIC_USAGE"); /// static const VISUAL_STATE_CALLBACK = - const WebViewFeature_._internal("VISUAL_STATE_CALLBACK"); + const WebViewFeature_._internal("VISUAL_STATE_CALLBACK"); /// static const WEB_MESSAGE_CALLBACK_ON_MESSAGE = - const WebViewFeature_._internal("WEB_MESSAGE_CALLBACK_ON_MESSAGE"); + const WebViewFeature_._internal("WEB_MESSAGE_CALLBACK_ON_MESSAGE"); ///Feature for [isFeatureSupported]. This feature covers [WebMessageListener]. static const WEB_MESSAGE_LISTENER = - const WebViewFeature_._internal("WEB_MESSAGE_LISTENER"); + const WebViewFeature_._internal("WEB_MESSAGE_LISTENER"); /// static const WEB_MESSAGE_PORT_CLOSE = - const WebViewFeature_._internal("WEB_MESSAGE_PORT_CLOSE"); + const WebViewFeature_._internal("WEB_MESSAGE_PORT_CLOSE"); /// static const WEB_MESSAGE_PORT_POST_MESSAGE = - const WebViewFeature_._internal("WEB_MESSAGE_PORT_POST_MESSAGE"); + const WebViewFeature_._internal("WEB_MESSAGE_PORT_POST_MESSAGE"); /// static const WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK = - const WebViewFeature_._internal("WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK"); + const WebViewFeature_._internal("WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK"); /// static const WEB_RESOURCE_ERROR_GET_CODE = - const WebViewFeature_._internal("WEB_RESOURCE_ERROR_GET_CODE"); + const WebViewFeature_._internal("WEB_RESOURCE_ERROR_GET_CODE"); /// static const WEB_RESOURCE_ERROR_GET_DESCRIPTION = - const WebViewFeature_._internal("WEB_RESOURCE_ERROR_GET_DESCRIPTION"); + const WebViewFeature_._internal("WEB_RESOURCE_ERROR_GET_DESCRIPTION"); /// static const WEB_RESOURCE_REQUEST_IS_REDIRECT = - const WebViewFeature_._internal("WEB_RESOURCE_REQUEST_IS_REDIRECT"); + const WebViewFeature_._internal("WEB_RESOURCE_REQUEST_IS_REDIRECT"); /// static const WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE = - const WebViewFeature_._internal("WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE"); + const WebViewFeature_._internal("WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE"); /// static const WEB_VIEW_RENDERER_TERMINATE = - const WebViewFeature_._internal("WEB_VIEW_RENDERER_TERMINATE"); + const WebViewFeature_._internal("WEB_VIEW_RENDERER_TERMINATE"); ///Feature for [isFeatureSupported]. This feature covers [UserScriptInjectionTime.AT_DOCUMENT_START]. static const DOCUMENT_START_SCRIPT = - const WebViewFeature_._internal("DOCUMENT_START_SCRIPT"); + const WebViewFeature_._internal("DOCUMENT_START_SCRIPT"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.willSuppressErrorPage]. static const SUPPRESS_ERROR_PAGE = - const WebViewFeature_._internal("SUPPRESS_ERROR_PAGE"); + const WebViewFeature_._internal("SUPPRESS_ERROR_PAGE"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.algorithmicDarkeningAllowed]. static const ALGORITHMIC_DARKENING = - const WebViewFeature_._internal("ALGORITHMIC_DARKENING"); + const WebViewFeature_._internal("ALGORITHMIC_DARKENING"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.enterpriseAuthenticationAppLinkPolicyEnabled]. static const ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY = - const WebViewFeature_._internal( - "ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY"); + const WebViewFeature_._internal( + "ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewController.getVariationsHeader]. static const GET_VARIATIONS_HEADER = - const WebViewFeature_._internal("GET_VARIATIONS_HEADER"); + const WebViewFeature_._internal("GET_VARIATIONS_HEADER"); ///Feature for [isFeatureSupported]. This feature covers cookie attributes of [CookieManager.getCookie] and [CookieManager.getCookies] methods. static const GET_COOKIE_INFO = - const WebViewFeature_._internal("GET_COOKIE_INFO"); + const WebViewFeature_._internal("GET_COOKIE_INFO"); ///Feature for [isFeatureSupported]. This feature covers cookie attributes of [CookieManager.getCookie] and [CookieManager.getCookies] methods. static const REQUESTED_WITH_HEADER_ALLOW_LIST = - const WebViewFeature_._internal("REQUESTED_WITH_HEADER_ALLOW_LIST"); + const WebViewFeature_._internal("REQUESTED_WITH_HEADER_ALLOW_LIST"); ///Feature for [isFeatureSupported]. This feature covers [WebMessagePort.postMessage] with `ArrayBuffer` type, ///[InAppWebViewController.postWebMessage] with `ArrayBuffer` type, and [JavaScriptReplyProxy.postMessage] with `ArrayBuffer` type. static const WEB_MESSAGE_ARRAY_BUFFER = - const WebViewFeature_._internal("WEB_MESSAGE_ARRAY_BUFFER"); + const WebViewFeature_._internal("WEB_MESSAGE_ARRAY_BUFFER"); ///Feature for [isStartupFeatureSupported]. This feature covers [ProcessGlobalConfigSettings.dataDirectorySuffix]. static const STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX = - const WebViewFeature_._internal( - "STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX"); + const WebViewFeature_._internal( + "STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX"); ///Feature for [isStartupFeatureSupported]. This feature covers [ProcessGlobalConfigSettings.directoryBasePaths]. static const STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS = - const WebViewFeature_._internal( - "STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS"); + const WebViewFeature_._internal( + "STARTUP_FEATURE_SET_DIRECTORY_BASE_PATHS"); ///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher, ///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device, @@ -364,7 +362,7 @@ class WebViewFeature_ { /// ///**Official Android API**: https://developer.android.com/reference/androidx/webkit/WebViewFeature#isFeatureSupported(java.lang.String) static Future isStartupFeatureSupported( - WebViewFeature startupFeature) => + WebViewFeature startupFeature) => PlatformWebViewFeature.static().isStartupFeatureSupported(startupFeature); } @@ -383,198 +381,198 @@ class AndroidWebViewFeature_ { /// static const CREATE_WEB_MESSAGE_CHANNEL = - const AndroidWebViewFeature_._internal("CREATE_WEB_MESSAGE_CHANNEL"); + const AndroidWebViewFeature_._internal("CREATE_WEB_MESSAGE_CHANNEL"); /// static const DISABLED_ACTION_MODE_MENU_ITEMS = - const AndroidWebViewFeature_._internal("DISABLED_ACTION_MODE_MENU_ITEMS"); + const AndroidWebViewFeature_._internal("DISABLED_ACTION_MODE_MENU_ITEMS"); /// static const FORCE_DARK = - const AndroidWebViewFeature_._internal("FORCE_DARK"); + const AndroidWebViewFeature_._internal("FORCE_DARK"); /// static const FORCE_DARK_STRATEGY = - const AndroidWebViewFeature_._internal("FORCE_DARK_STRATEGY"); + const AndroidWebViewFeature_._internal("FORCE_DARK_STRATEGY"); /// static const GET_WEB_CHROME_CLIENT = - const AndroidWebViewFeature_._internal("GET_WEB_CHROME_CLIENT"); + const AndroidWebViewFeature_._internal("GET_WEB_CHROME_CLIENT"); /// static const GET_WEB_VIEW_CLIENT = - const AndroidWebViewFeature_._internal("GET_WEB_VIEW_CLIENT"); + const AndroidWebViewFeature_._internal("GET_WEB_VIEW_CLIENT"); /// static const GET_WEB_VIEW_RENDERER = - const AndroidWebViewFeature_._internal("GET_WEB_VIEW_RENDERER"); + const AndroidWebViewFeature_._internal("GET_WEB_VIEW_RENDERER"); /// static const MULTI_PROCESS = - const AndroidWebViewFeature_._internal("MULTI_PROCESS"); + const AndroidWebViewFeature_._internal("MULTI_PROCESS"); /// static const OFF_SCREEN_PRERASTER = - const AndroidWebViewFeature_._internal("OFF_SCREEN_PRERASTER"); + const AndroidWebViewFeature_._internal("OFF_SCREEN_PRERASTER"); /// static const POST_WEB_MESSAGE = - const AndroidWebViewFeature_._internal("POST_WEB_MESSAGE"); + const AndroidWebViewFeature_._internal("POST_WEB_MESSAGE"); /// static const PROXY_OVERRIDE = - const AndroidWebViewFeature_._internal("PROXY_OVERRIDE"); + const AndroidWebViewFeature_._internal("PROXY_OVERRIDE"); /// static const RECEIVE_HTTP_ERROR = - const AndroidWebViewFeature_._internal("RECEIVE_HTTP_ERROR"); + const AndroidWebViewFeature_._internal("RECEIVE_HTTP_ERROR"); /// static const RECEIVE_WEB_RESOURCE_ERROR = - const AndroidWebViewFeature_._internal("RECEIVE_WEB_RESOURCE_ERROR"); + const AndroidWebViewFeature_._internal("RECEIVE_WEB_RESOURCE_ERROR"); /// static const SAFE_BROWSING_ALLOWLIST = - const AndroidWebViewFeature_._internal("SAFE_BROWSING_ALLOWLIST"); + const AndroidWebViewFeature_._internal("SAFE_BROWSING_ALLOWLIST"); /// static const SAFE_BROWSING_ENABLE = - const AndroidWebViewFeature_._internal("SAFE_BROWSING_ENABLE"); + const AndroidWebViewFeature_._internal("SAFE_BROWSING_ENABLE"); /// static const SAFE_BROWSING_HIT = - const AndroidWebViewFeature_._internal("SAFE_BROWSING_HIT"); + const AndroidWebViewFeature_._internal("SAFE_BROWSING_HIT"); /// static const SAFE_BROWSING_PRIVACY_POLICY_URL = - const AndroidWebViewFeature_._internal( - "SAFE_BROWSING_PRIVACY_POLICY_URL"); + const AndroidWebViewFeature_._internal( + "SAFE_BROWSING_PRIVACY_POLICY_URL"); /// static const SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY = - const AndroidWebViewFeature_._internal( - "SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"); + const AndroidWebViewFeature_._internal( + "SAFE_BROWSING_RESPONSE_BACK_TO_SAFETY"); /// static const SAFE_BROWSING_RESPONSE_PROCEED = - const AndroidWebViewFeature_._internal("SAFE_BROWSING_RESPONSE_PROCEED"); + const AndroidWebViewFeature_._internal("SAFE_BROWSING_RESPONSE_PROCEED"); /// static const SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL = - const AndroidWebViewFeature_._internal( - "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"); + const AndroidWebViewFeature_._internal( + "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"); ///Use [SAFE_BROWSING_ALLOWLIST] instead. @Deprecated('Use SAFE_BROWSING_ALLOWLIST instead') static const SAFE_BROWSING_WHITELIST = - const AndroidWebViewFeature_._internal("SAFE_BROWSING_WHITELIST"); + const AndroidWebViewFeature_._internal("SAFE_BROWSING_WHITELIST"); /// static const SERVICE_WORKER_BASIC_USAGE = - const AndroidWebViewFeature_._internal("SERVICE_WORKER_BASIC_USAGE"); + const AndroidWebViewFeature_._internal("SERVICE_WORKER_BASIC_USAGE"); /// static const SERVICE_WORKER_BLOCK_NETWORK_LOADS = - const AndroidWebViewFeature_._internal( - "SERVICE_WORKER_BLOCK_NETWORK_LOADS"); + const AndroidWebViewFeature_._internal( + "SERVICE_WORKER_BLOCK_NETWORK_LOADS"); /// static const SERVICE_WORKER_CACHE_MODE = - const AndroidWebViewFeature_._internal("SERVICE_WORKER_CACHE_MODE"); + const AndroidWebViewFeature_._internal("SERVICE_WORKER_CACHE_MODE"); /// static const SERVICE_WORKER_CONTENT_ACCESS = - const AndroidWebViewFeature_._internal("SERVICE_WORKER_CONTENT_ACCESS"); + const AndroidWebViewFeature_._internal("SERVICE_WORKER_CONTENT_ACCESS"); /// static const SERVICE_WORKER_FILE_ACCESS = - const AndroidWebViewFeature_._internal("SERVICE_WORKER_FILE_ACCESS"); + const AndroidWebViewFeature_._internal("SERVICE_WORKER_FILE_ACCESS"); /// static const SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST = - const AndroidWebViewFeature_._internal( - "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"); + const AndroidWebViewFeature_._internal( + "SERVICE_WORKER_SHOULD_INTERCEPT_REQUEST"); /// static const SHOULD_OVERRIDE_WITH_REDIRECTS = - const AndroidWebViewFeature_._internal("SHOULD_OVERRIDE_WITH_REDIRECTS"); + const AndroidWebViewFeature_._internal("SHOULD_OVERRIDE_WITH_REDIRECTS"); /// static const START_SAFE_BROWSING = - const AndroidWebViewFeature_._internal("START_SAFE_BROWSING"); + const AndroidWebViewFeature_._internal("START_SAFE_BROWSING"); /// static const TRACING_CONTROLLER_BASIC_USAGE = - const AndroidWebViewFeature_._internal("TRACING_CONTROLLER_BASIC_USAGE"); + const AndroidWebViewFeature_._internal("TRACING_CONTROLLER_BASIC_USAGE"); /// static const VISUAL_STATE_CALLBACK = - const AndroidWebViewFeature_._internal("VISUAL_STATE_CALLBACK"); + const AndroidWebViewFeature_._internal("VISUAL_STATE_CALLBACK"); /// static const WEB_MESSAGE_CALLBACK_ON_MESSAGE = - const AndroidWebViewFeature_._internal("WEB_MESSAGE_CALLBACK_ON_MESSAGE"); + const AndroidWebViewFeature_._internal("WEB_MESSAGE_CALLBACK_ON_MESSAGE"); /// static const WEB_MESSAGE_LISTENER = - const AndroidWebViewFeature_._internal("WEB_MESSAGE_LISTENER"); + const AndroidWebViewFeature_._internal("WEB_MESSAGE_LISTENER"); /// static const WEB_MESSAGE_PORT_CLOSE = - const AndroidWebViewFeature_._internal("WEB_MESSAGE_PORT_CLOSE"); + const AndroidWebViewFeature_._internal("WEB_MESSAGE_PORT_CLOSE"); /// static const WEB_MESSAGE_PORT_POST_MESSAGE = - const AndroidWebViewFeature_._internal("WEB_MESSAGE_PORT_POST_MESSAGE"); + const AndroidWebViewFeature_._internal("WEB_MESSAGE_PORT_POST_MESSAGE"); /// static const WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK = - const AndroidWebViewFeature_._internal( - "WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK"); + const AndroidWebViewFeature_._internal( + "WEB_MESSAGE_PORT_SET_MESSAGE_CALLBACK"); /// static const WEB_RESOURCE_ERROR_GET_CODE = - const AndroidWebViewFeature_._internal("WEB_RESOURCE_ERROR_GET_CODE"); + const AndroidWebViewFeature_._internal("WEB_RESOURCE_ERROR_GET_CODE"); /// static const WEB_RESOURCE_ERROR_GET_DESCRIPTION = - const AndroidWebViewFeature_._internal( - "WEB_RESOURCE_ERROR_GET_DESCRIPTION"); + const AndroidWebViewFeature_._internal( + "WEB_RESOURCE_ERROR_GET_DESCRIPTION"); /// static const WEB_RESOURCE_REQUEST_IS_REDIRECT = - const AndroidWebViewFeature_._internal( - "WEB_RESOURCE_REQUEST_IS_REDIRECT"); + const AndroidWebViewFeature_._internal( + "WEB_RESOURCE_REQUEST_IS_REDIRECT"); /// static const WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE = - const AndroidWebViewFeature_._internal( - "WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE"); + const AndroidWebViewFeature_._internal( + "WEB_VIEW_RENDERER_CLIENT_BASIC_USAGE"); /// static const WEB_VIEW_RENDERER_TERMINATE = - const AndroidWebViewFeature_._internal("WEB_VIEW_RENDERER_TERMINATE"); + const AndroidWebViewFeature_._internal("WEB_VIEW_RENDERER_TERMINATE"); ///Feature for [isFeatureSupported]. This feature covers [UserScriptInjectionTime.AT_DOCUMENT_START]. static const DOCUMENT_START_SCRIPT = - const AndroidWebViewFeature_._internal("DOCUMENT_START_SCRIPT"); + const AndroidWebViewFeature_._internal("DOCUMENT_START_SCRIPT"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.willSuppressErrorPage]. static const SUPPRESS_ERROR_PAGE = - const AndroidWebViewFeature_._internal("SUPPRESS_ERROR_PAGE"); + const AndroidWebViewFeature_._internal("SUPPRESS_ERROR_PAGE"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.algorithmicDarkeningAllowed]. static const ALGORITHMIC_DARKENING = - const AndroidWebViewFeature_._internal("ALGORITHMIC_DARKENING"); + const AndroidWebViewFeature_._internal("ALGORITHMIC_DARKENING"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.requestedWithHeaderMode]. static const REQUESTED_WITH_HEADER_CONTROL = - const AndroidWebViewFeature_._internal("REQUESTED_WITH_HEADER_CONTROL"); + const AndroidWebViewFeature_._internal("REQUESTED_WITH_HEADER_CONTROL"); ///Feature for [isFeatureSupported]. This feature covers [InAppWebViewSettings.enterpriseAuthenticationAppLinkPolicyEnabled]. static const ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY = - const AndroidWebViewFeature_._internal( - "ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY"); + const AndroidWebViewFeature_._internal( + "ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY"); ///Return whether a feature is supported at run-time. On devices running Android version `Build.VERSION_CODES.LOLLIPOP` and higher, ///this will check whether a feature is supported, depending on the combination of the desired feature, the Android version of device, @@ -584,4 +582,4 @@ class AndroidWebViewFeature_ { static Future isFeatureSupported(AndroidWebViewFeature feature) => PlatformWebViewFeature.static().isFeatureSupported( WebViewFeature.fromNativeValue(feature.toNativeValue())!); -} \ No newline at end of file +} diff --git a/flutter_inappwebview_platform_interface/lib/src/pull_to_refresh/platform_pull_to_refresh_controller.dart b/flutter_inappwebview_platform_interface/lib/src/pull_to_refresh/platform_pull_to_refresh_controller.dart index ab685ab4..9da78155 100644 --- a/flutter_inappwebview_platform_interface/lib/src/pull_to_refresh/platform_pull_to_refresh_controller.dart +++ b/flutter_inappwebview_platform_interface/lib/src/pull_to_refresh/platform_pull_to_refresh_controller.dart @@ -15,10 +15,11 @@ import 'pull_to_refresh_settings.dart'; /// this class. class PlatformPullToRefreshControllerCreationParams { /// Used by the platform implementation to create a new [PlatformPullToRefreshController]. - PlatformPullToRefreshControllerCreationParams({ - @Deprecated("Use settings instead") PullToRefreshOptions? options, - PullToRefreshSettings? settings, - this.onRefresh}) : this.options = options ?? PullToRefreshOptions(), + PlatformPullToRefreshControllerCreationParams( + {@Deprecated("Use settings instead") PullToRefreshOptions? options, + PullToRefreshSettings? settings, + this.onRefresh}) + : this.options = options ?? PullToRefreshOptions(), this.settings = settings ?? PullToRefreshSettings(); @Deprecated("Use settings instead") @@ -40,7 +41,8 @@ class PlatformPullToRefreshControllerCreationParams { ///**Supported Platforms/Implementations**: ///- Android native WebView ///- iOS -abstract class PlatformPullToRefreshController extends PlatformInterface implements Disposable { +abstract class PlatformPullToRefreshController extends PlatformInterface + implements Disposable { ///Debug settings. static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); @@ -48,14 +50,15 @@ abstract class PlatformPullToRefreshController extends PlatformInterface impleme factory PlatformPullToRefreshController( PlatformPullToRefreshControllerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformPullToRefreshController webViewControllerDelegate = - InAppWebViewPlatform.instance!.createPlatformPullToRefreshController(params); + InAppWebViewPlatform.instance! + .createPlatformPullToRefreshController(params); PlatformInterface.verify(webViewControllerDelegate, _token); return webViewControllerDelegate; } @@ -65,7 +68,8 @@ abstract class PlatformPullToRefreshController extends PlatformInterface impleme /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformPullToRefreshController.implementation(this.params) : super(token: _token); + PlatformPullToRefreshController.implementation(this.params) + : super(token: _token); static final Object _token = Object(); diff --git a/flutter_inappwebview_platform_interface/lib/src/types/client_cert_challenge.dart b/flutter_inappwebview_platform_interface/lib/src/types/client_cert_challenge.dart index 09dc3233..d3bef46e 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/client_cert_challenge.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/client_cert_challenge.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'url_authentication_challenge.dart'; import 'url_protection_space.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/client_cert_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/client_cert_response.dart index 74372b9c..591581d2 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/client_cert_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/client_cert_response.dart @@ -1,8 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import '../util.dart'; import 'client_cert_response_action.dart'; 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 e6490153..979df09d 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/console_message.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/console_message.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'console_message_level.dart'; part 'console_message.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/create_window_action.dart b/flutter_inappwebview_platform_interface/lib/src/types/create_window_action.dart index 6499bd8c..b0b90dff 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/create_window_action.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/create_window_action.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'navigation_action.dart'; import 'window_features.dart'; import 'url_request.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/custom_scheme_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/custom_scheme_response.dart index 79496520..0226fa7a 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/custom_scheme_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/custom_scheme_response.dart @@ -2,8 +2,6 @@ import 'dart:typed_data'; import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'custom_scheme_response.g.dart'; ///Class representing the response returned by the [WebView.onLoadResourceWithCustomScheme] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/download_start_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/download_start_request.dart index 70d1d434..9407e850 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/download_start_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/download_start_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'download_start_request.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/force_dark_strategy.dart b/flutter_inappwebview_platform_interface/lib/src/types/force_dark_strategy.dart index 337f5be7..f59b59f0 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/force_dark_strategy.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/force_dark_strategy.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'force_dark_strategy.g.dart'; ///Class used to indicate how `WebView` content should be darkened. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/form_resubmission_action.dart b/flutter_inappwebview_platform_interface/lib/src/types/form_resubmission_action.dart index 8d30460d..a681fdc1 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/form_resubmission_action.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/form_resubmission_action.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'form_resubmission_action.g.dart'; ///Class that represents the action to take used by the [WebView.onFormResubmission] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/geolocation_permission_show_prompt_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/geolocation_permission_show_prompt_response.dart index 81413380..d9fe04a5 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/geolocation_permission_show_prompt_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/geolocation_permission_show_prompt_response.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'geolocation_permission_show_prompt_response.g.dart'; ///Class used by the host application to set the Geolocation permission state for an origin during the [WebView.onGeolocationPermissionsShowPrompt] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/http_auth_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/http_auth_response.dart index 17202e14..cc12837d 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/http_auth_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/http_auth_response.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'http_auth_response_action.dart'; part 'http_auth_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/http_authentication_challenge.dart b/flutter_inappwebview_platform_interface/lib/src/types/http_authentication_challenge.dart index d17905ec..bf9f5a77 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/http_authentication_challenge.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/http_authentication_challenge.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'url_credential.dart'; import 'url_response.dart'; import 'url_authentication_challenge.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/in_app_webview_initial_data.dart b/flutter_inappwebview_platform_interface/lib/src/types/in_app_webview_initial_data.dart index fb76b5b5..7a26edb3 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/in_app_webview_initial_data.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/in_app_webview_initial_data.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'in_app_webview_initial_data.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_alert_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_alert_request.dart index 56aeaeb6..963d6d2f 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_alert_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_alert_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'js_alert_request.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_alert_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_alert_response.dart index 3600fc76..75150589 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_alert_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_alert_response.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'js_alert_response_action.dart'; part 'js_alert_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_request.dart index f8b14379..662465a4 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'js_before_unload_request.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_response.dart index 3076bdfb..2c618629 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_before_unload_response.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'js_before_unload_response_action.dart'; part 'js_before_unload_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_request.dart index 6ad92c4d..d46bfb9b 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'js_confirm_request.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_response.dart index 0ec3a610..6a1f366e 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_confirm_response.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'js_confirm_response_action.dart'; part 'js_confirm_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_request.dart index a9d13ad0..3a0f0532 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'js_prompt_request.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_response.dart index f07254b9..50604ff3 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/js_prompt_response.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'js_prompt_response_action.dart'; part 'js_prompt_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/loaded_resource.dart b/flutter_inappwebview_platform_interface/lib/src/types/loaded_resource.dart index 1ec2d945..449b24bf 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/loaded_resource.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/loaded_resource.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'loaded_resource.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/login_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/login_request.dart index 422c2a60..0aa8d167 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/login_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/login_request.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'login_request.g.dart'; ///Class used by [WebView.onReceivedLoginRequest] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/main.dart b/flutter_inappwebview_platform_interface/lib/src/types/main.dart index cc320565..92719333 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/main.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/main.dart @@ -225,4 +225,4 @@ export 'tracing_mode.dart' show TracingMode; export 'tracing_category.dart' show TracingCategory; export 'custom_tabs_post_message_result_type.dart' show CustomTabsPostMessageResultType; -export 'disposable.dart'; \ No newline at end of file +export 'disposable.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/navigation_action.dart b/flutter_inappwebview_platform_interface/lib/src/types/navigation_action.dart index cf312003..70e751b9 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/navigation_action.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/navigation_action.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'url_request.dart'; import 'navigation_type.dart'; import 'frame_info.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/navigation_action_policy.dart b/flutter_inappwebview_platform_interface/lib/src/types/navigation_action_policy.dart index 5f031647..1e0cd69e 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/navigation_action_policy.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/navigation_action_policy.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'navigation_action_policy.g.dart'; ///Class that is used by [WebView.shouldOverrideUrlLoading] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/navigation_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/navigation_response.dart index 95d8fc0c..5ef97a0d 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/navigation_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/navigation_response.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'url_response.dart'; part 'navigation_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/navigation_response_action.dart b/flutter_inappwebview_platform_interface/lib/src/types/navigation_response_action.dart index 871a61c8..dbad994a 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/navigation_response_action.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/navigation_response_action.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'navigation_response_action.g.dart'; ///Class that is used by [WebView.onNavigationResponse] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/navigation_type.dart b/flutter_inappwebview_platform_interface/lib/src/types/navigation_type.dart index 9089a844..d0057db3 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/navigation_type.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/navigation_type.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'navigation_type.g.dart'; ///Class that represents the type of action triggering a navigation for the [WebView.shouldOverrideUrlLoading] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/over_scroll_mode.dart b/flutter_inappwebview_platform_interface/lib/src/types/over_scroll_mode.dart index dac1a582..eb193421 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/over_scroll_mode.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/over_scroll_mode.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'over_scroll_mode.g.dart'; ///Class used to configure the `WebView`'s over-scroll mode. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/pdf_configuration.dart b/flutter_inappwebview_platform_interface/lib/src/types/pdf_configuration.dart index 14afbeca..20e52f93 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/pdf_configuration.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/pdf_configuration.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'in_app_webview_rect.dart'; part 'pdf_configuration.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/permission_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/permission_request.dart index c581464e..66291a61 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/permission_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/permission_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; import 'permission_resource_type.dart'; import 'permission_response.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/permission_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/permission_response.dart index 3d6160d7..6a367351 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/permission_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/permission_response.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'permission_resource_type.dart'; import 'permission_response_action.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/render_process_gone_detail.dart b/flutter_inappwebview_platform_interface/lib/src/types/render_process_gone_detail.dart index 961931c3..039c2996 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/render_process_gone_detail.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/render_process_gone_detail.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'renderer_priority.dart'; part 'render_process_gone_detail.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/renderer_priority_policy.dart b/flutter_inappwebview_platform_interface/lib/src/types/renderer_priority_policy.dart index 6a662df4..b485bc11 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/renderer_priority_policy.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/renderer_priority_policy.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'renderer_priority.dart'; part 'renderer_priority_policy.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/safe_browsing_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/safe_browsing_response.dart index d113e817..4db7ff2d 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/safe_browsing_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/safe_browsing_response.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../in_app_webview/platform_inappwebview_controller.dart'; import 'safe_browsing_response_action.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/screenshot_configuration.dart b/flutter_inappwebview_platform_interface/lib/src/types/screenshot_configuration.dart index f9a7ccc6..ce033a58 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/screenshot_configuration.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/screenshot_configuration.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../in_app_webview/platform_inappwebview_controller.dart'; import 'in_app_webview_rect.dart'; import 'compress_format.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/server_trust_auth_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/server_trust_auth_response.dart index 547347b0..2af181f8 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/server_trust_auth_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/server_trust_auth_response.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'server_trust_auth_response_action.dart'; part 'server_trust_auth_response.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/server_trust_challenge.dart b/flutter_inappwebview_platform_interface/lib/src/types/server_trust_challenge.dart index ae1fa8eb..3f2b1aba 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/server_trust_challenge.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/server_trust_challenge.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'url_authentication_challenge.dart'; import 'url_protection_space.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/should_allow_deprecated_tls_action.dart b/flutter_inappwebview_platform_interface/lib/src/types/should_allow_deprecated_tls_action.dart index a2d9119e..1ab64167 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/should_allow_deprecated_tls_action.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/should_allow_deprecated_tls_action.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'should_allow_deprecated_tls_action.g.dart'; ///Class that is used by [WebView.shouldAllowDeprecatedTLS] event. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/user_script.dart b/flutter_inappwebview_platform_interface/lib/src/types/user_script.dart index 496ddde0..cae6b382 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/user_script.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/user_script.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'user_script_injection_time.dart'; import 'content_world.dart'; import '../platform_webview_feature.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/user_script_injection_time.dart b/flutter_inappwebview_platform_interface/lib/src/types/user_script_injection_time.dart index 74e77906..ebe084fc 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/user_script_injection_time.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/user_script_injection_time.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import 'user_script.dart'; part 'user_script_injection_time.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/web_history.dart b/flutter_inappwebview_platform_interface/lib/src/types/web_history.dart index a084c14f..437ab020 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/web_history.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/web_history.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import 'web_history_item.dart'; part 'web_history.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/web_history_item.dart b/flutter_inappwebview_platform_interface/lib/src/types/web_history_item.dart index 2dfe3234..84fc615f 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/web_history_item.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/web_history_item.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - import '../web_uri.dart'; import 'web_history.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/web_resource_request.dart b/flutter_inappwebview_platform_interface/lib/src/types/web_resource_request.dart index aa2443d4..f92abb1a 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/web_resource_request.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/web_resource_request.dart @@ -1,6 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - import '../web_uri.dart'; part 'web_resource_request.g.dart'; diff --git a/flutter_inappwebview_platform_interface/lib/src/types/web_resource_response.dart b/flutter_inappwebview_platform_interface/lib/src/types/web_resource_response.dart index 4938cd9d..8df388d3 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/web_resource_response.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/web_resource_response.dart @@ -2,8 +2,6 @@ import 'dart:typed_data'; import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'web_resource_response.g.dart'; ///Class representing a resource response of the `WebView`. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/webview_package_info.dart b/flutter_inappwebview_platform_interface/lib/src/types/webview_package_info.dart index 2f93d783..ec5985d1 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/webview_package_info.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/webview_package_info.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'webview_package_info.g.dart'; ///Class that represents a `WebView` package info. diff --git a/flutter_inappwebview_platform_interface/lib/src/types/webview_render_process_action.dart b/flutter_inappwebview_platform_interface/lib/src/types/webview_render_process_action.dart index 6f3eec90..1d80e793 100644 --- a/flutter_inappwebview_platform_interface/lib/src/types/webview_render_process_action.dart +++ b/flutter_inappwebview_platform_interface/lib/src/types/webview_render_process_action.dart @@ -1,7 +1,5 @@ import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart'; - - part 'webview_render_process_action.g.dart'; ///Class that represents the action to take used by the [WebView.onRenderProcessUnresponsive] and [WebView.onRenderProcessResponsive] event diff --git a/flutter_inappwebview_platform_interface/lib/src/web_authentication_session/platform_web_authenticate_session.dart b/flutter_inappwebview_platform_interface/lib/src/web_authentication_session/platform_web_authenticate_session.dart index 225a2808..352a9e27 100755 --- a/flutter_inappwebview_platform_interface/lib/src/web_authentication_session/platform_web_authenticate_session.dart +++ b/flutter_inappwebview_platform_interface/lib/src/web_authentication_session/platform_web_authenticate_session.dart @@ -66,7 +66,8 @@ class PlatformWebAuthenticationSessionCreationParams { ///**Supported Platforms/Implementations**: ///- iOS ///- MacOS -abstract class PlatformWebAuthenticationSession extends PlatformInterface implements Disposable { +abstract class PlatformWebAuthenticationSession extends PlatformInterface + implements Disposable { ///Debug settings. static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); @@ -74,14 +75,15 @@ abstract class PlatformWebAuthenticationSession extends PlatformInterface implem factory PlatformWebAuthenticationSession( PlatformWebAuthenticationSessionCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformWebAuthenticationSession webAuthenticationSession = - InAppWebViewPlatform.instance!.createPlatformWebAuthenticationSession(params); + InAppWebViewPlatform.instance! + .createPlatformWebAuthenticationSession(params); PlatformInterface.verify(webAuthenticationSession, _token); return webAuthenticationSession; } @@ -89,14 +91,15 @@ abstract class PlatformWebAuthenticationSession extends PlatformInterface implem /// Creates a new [PlatformWebAuthenticationSession] to access static methods. factory PlatformWebAuthenticationSession.static() { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformWebAuthenticationSession webAuthenticationSessionStatic = - InAppWebViewPlatform.instance!.createPlatformWebAuthenticationSessionStatic(); + InAppWebViewPlatform.instance! + .createPlatformWebAuthenticationSessionStatic(); PlatformInterface.verify(webAuthenticationSessionStatic, _token); return webAuthenticationSessionStatic; } @@ -106,7 +109,8 @@ abstract class PlatformWebAuthenticationSession extends PlatformInterface implem /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformWebAuthenticationSession.implementation(this.params) : super(token: _token); + PlatformWebAuthenticationSession.implementation(this.params) + : super(token: _token); static final Object _token = Object(); @@ -131,7 +135,8 @@ abstract class PlatformWebAuthenticationSession extends PlatformInterface implem ///{@template flutter_inappwebview_platform_interface.PlatformWebAuthenticationSession.initialSettings} ///Initial settings. ///{@endtemplate} - WebAuthenticationSessionSettings? get initialSettings => params.initialSettings; + WebAuthenticationSessionSettings? get initialSettings => + params.initialSettings; ///{@template flutter_inappwebview_platform_interface.PlatformWebAuthenticationSession.onComplete} ///A completion handler the session calls when it completes successfully, or when the user cancels the session. diff --git a/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_channel.dart b/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_channel.dart index a46b214e..6482269b 100644 --- a/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_channel.dart +++ b/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_channel.dart @@ -56,14 +56,14 @@ abstract class PlatformWebMessageChannel extends PlatformInterface /// Creates a new [PlatformWebMessageChannel] to access static methods. factory PlatformWebMessageChannel.static() { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformWebMessageChannel webMessageChannelStatic = - InAppWebViewPlatform.instance!.createPlatformWebMessageChannelStatic(); + InAppWebViewPlatform.instance!.createPlatformWebMessageChannelStatic(); PlatformInterface.verify(webMessageChannelStatic, _token); return webMessageChannelStatic; } @@ -111,4 +111,3 @@ abstract class PlatformWebMessageChannel extends PlatformInterface return 'PlatformWebMessageChannel{id: $id, port1: $port1, port2: $port2}'; } } - diff --git a/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_listener.dart b/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_listener.dart index 01c0de44..b54a652b 100644 --- a/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_listener.dart +++ b/flutter_inappwebview_platform_interface/lib/src/web_message/platform_web_message_listener.dart @@ -15,8 +15,8 @@ class PlatformWebMessageListenerCreationParams { /// Used by the platform implementation to create a new [PlatformWebMessageListener]. const PlatformWebMessageListenerCreationParams( {required this.jsObjectName, - this.allowedOriginRules, - this.onPostMessage}); + this.allowedOriginRules, + this.onPostMessage}); ///{@macro flutter_inappwebview_platform_interface.PlatformWebMessageListener.jsObjectName} final String jsObjectName; @@ -39,19 +39,20 @@ class PlatformWebMessageListenerCreationParams { ///- Android native WebView ///- iOS ///- MacOS -abstract class PlatformWebMessageListener extends PlatformInterface implements Disposable { +abstract class PlatformWebMessageListener extends PlatformInterface + implements Disposable { /// Creates a new [PlatformWebMessageListener] factory PlatformWebMessageListener( PlatformWebMessageListenerCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformWebMessageListener webMessageListener = - InAppWebViewPlatform.instance!.createPlatformWebMessageListener(params); + InAppWebViewPlatform.instance!.createPlatformWebMessageListener(params); PlatformInterface.verify(webMessageListener, _token); return webMessageListener; } @@ -121,7 +122,8 @@ abstract class PlatformWebMessageListener extends PlatformInterface implements D @immutable class PlatformJavaScriptReplyProxyCreationParams { /// Used by the platform implementation to create a new [PlatformJavaScriptReplyProxy]. - const PlatformJavaScriptReplyProxyCreationParams({required this.webMessageListener}); + const PlatformJavaScriptReplyProxyCreationParams( + {required this.webMessageListener}); final PlatformWebMessageListener webMessageListener; } @@ -136,14 +138,15 @@ abstract class PlatformJavaScriptReplyProxy extends PlatformInterface { factory PlatformJavaScriptReplyProxy( PlatformJavaScriptReplyProxyCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformJavaScriptReplyProxy javaScriptReplyProxy = - InAppWebViewPlatform.instance!.createPlatformJavaScriptReplyProxy(params); + InAppWebViewPlatform.instance! + .createPlatformJavaScriptReplyProxy(params); PlatformInterface.verify(javaScriptReplyProxy, _token); return javaScriptReplyProxy; } @@ -153,7 +156,8 @@ abstract class PlatformJavaScriptReplyProxy extends PlatformInterface { /// Should only be used by platform implementations because they can't extend /// a class that only contains a factory constructor. @protected - PlatformJavaScriptReplyProxy.implementation(this.params) : super(token: _token); + PlatformJavaScriptReplyProxy.implementation(this.params) + : super(token: _token); static final Object _token = Object(); diff --git a/flutter_inappwebview_platform_interface/lib/src/web_storage/platform_web_storage.dart b/flutter_inappwebview_platform_interface/lib/src/web_storage/platform_web_storage.dart index b842368b..f4fe0b7c 100644 --- a/flutter_inappwebview_platform_interface/lib/src/web_storage/platform_web_storage.dart +++ b/flutter_inappwebview_platform_interface/lib/src/web_storage/platform_web_storage.dart @@ -32,7 +32,8 @@ class PlatformWebStorageCreationParams { ///- iOS ///- MacOS ///- Web -abstract class PlatformWebStorage extends PlatformInterface implements Disposable { +abstract class PlatformWebStorage extends PlatformInterface + implements Disposable { /// Creates a new [PlatformWebStorage] factory PlatformWebStorage(PlatformWebStorageCreationParams params) { assert( @@ -217,7 +218,8 @@ abstract class PlatformStorage extends PlatformInterface implements Disposable { @override void dispose() { - throw UnimplementedError('dispose is not implemented on the current platform'); + throw UnimplementedError( + 'dispose is not implemented on the current platform'); } } @@ -280,13 +282,14 @@ abstract class PlatformLocalStorage extends PlatformStorage { /// Platform specific implementations can add additional fields by extending /// this class. @immutable -class PlatformSessionStorageCreationParams extends PlatformStorageCreationParams { +class PlatformSessionStorageCreationParams + extends PlatformStorageCreationParams { /// Used by the platform implementation to create a new [PlatformSessionStorage]. const PlatformSessionStorageCreationParams( - // This parameter prevents breaking changes later. - // ignore: avoid_unused_constructor_parameters - PlatformStorageCreationParams params, - ) : super(webStorageType: WebStorageType.SESSION_STORAGE); + // This parameter prevents breaking changes later. + // ignore: avoid_unused_constructor_parameters + PlatformStorageCreationParams params, + ) : super(webStorageType: WebStorageType.SESSION_STORAGE); /// Creates a [AndroidCookieManagerCreationParams] instance based on [PlatformCookieManagerCreationParams]. factory PlatformSessionStorageCreationParams.fromPlatformStorageCreationParams( @@ -301,14 +304,14 @@ abstract class PlatformSessionStorage extends PlatformStorage { /// Creates a new [PlatformSessionStorage] factory PlatformSessionStorage(PlatformSessionStorageCreationParams params) { assert( - InAppWebViewPlatform.instance != null, - 'A platform implementation for `flutter_inappwebview` has not been set. Please ' - 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' - '`InAppWebViewPlatform.instance` before use. For unit testing, ' - '`InAppWebViewPlatform.instance` can be set with your own test implementation.', + InAppWebViewPlatform.instance != null, + 'A platform implementation for `flutter_inappwebview` has not been set. Please ' + 'ensure that an implementation of `InAppWebViewPlatform` has been set to ' + '`InAppWebViewPlatform.instance` before use. For unit testing, ' + '`InAppWebViewPlatform.instance` can be set with your own test implementation.', ); final PlatformSessionStorage sessionStorage = - InAppWebViewPlatform.instance!.createPlatformSessionStorage(params); + InAppWebViewPlatform.instance!.createPlatformSessionStorage(params); PlatformInterface.verify(sessionStorage, _token); return sessionStorage; } @@ -320,11 +323,11 @@ abstract class PlatformSessionStorage extends PlatformStorage { @protected PlatformSessionStorage.implementation(PlatformStorageCreationParams params) : super.implementation( - params is PlatformSessionStorageCreationParams - ? params - : PlatformSessionStorageCreationParams - .fromPlatformStorageCreationParams(params), - ); + params is PlatformSessionStorageCreationParams + ? params + : PlatformSessionStorageCreationParams + .fromPlatformStorageCreationParams(params), + ); static final Object _token = Object(); } diff --git a/lib/src/chrome_safari_browser/chrome_safari_browser.dart b/lib/src/chrome_safari_browser/chrome_safari_browser.dart index b2afc253..96ef027c 100755 --- a/lib/src/chrome_safari_browser/chrome_safari_browser.dart +++ b/lib/src/chrome_safari_browser/chrome_safari_browser.dart @@ -1,5 +1,4 @@ import 'dart:async'; -import 'dart:collection'; import 'dart:typed_data'; import 'package:flutter/foundation.dart'; @@ -17,9 +16,6 @@ import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_pla ///- Android ///- iOS class ChromeSafariBrowser implements PlatformChromeSafariBrowserEvents { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - /// Constructs a [ChromeSafariBrowser]. /// /// See [ChromeSafariBrowser.fromPlatformCreationParams] for setting diff --git a/lib/src/find_interaction/find_interaction_controller.dart b/lib/src/find_interaction/find_interaction_controller.dart index 8647d88d..782cd1c0 100644 --- a/lib/src/find_interaction/find_interaction_controller.dart +++ b/lib/src/find_interaction/find_interaction_controller.dart @@ -5,9 +5,6 @@ import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_pla ///- iOS ///- MacOS class FindInteractionController { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - FindInteractionController( {void Function(PlatformFindInteractionController controller, int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)? @@ -31,11 +28,9 @@ class FindInteractionController { final PlatformFindInteractionController platform; ///{@macro flutter_inappwebview_platform_interface.PlatformFindInteractionController.onFindResultReceived} - void Function( - PlatformFindInteractionController controller, - int activeMatchOrdinal, - int numberOfMatches, - bool isDoneCounting)? get onFindResultReceived => platform.onFindResultReceived; + void Function(PlatformFindInteractionController controller, + int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)? + get onFindResultReceived => platform.onFindResultReceived; ///Finds all instances of find on the page and highlights them. Notifies [FindInteractionController.onFindResultReceived] listener. /// diff --git a/lib/src/in_app_browser/in_app_browser.dart b/lib/src/in_app_browser/in_app_browser.dart index bc39dc6f..7e6f9032 100755 --- a/lib/src/in_app_browser/in_app_browser.dart +++ b/lib/src/in_app_browser/in_app_browser.dart @@ -21,9 +21,6 @@ import '../print_job/main.dart'; ///- iOS ///- MacOS class InAppBrowser implements PlatformInAppBrowserEvents { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - /// Constructs a [InAppBrowser]. /// /// See [InAppBrowser.fromPlatformCreationParams] for setting diff --git a/lib/src/in_app_webview/android/in_app_webview_controller.dart b/lib/src/in_app_webview/android/in_app_webview_controller.dart index 7bb2af3d..99d904c7 100644 --- a/lib/src/in_app_webview/android/in_app_webview_controller.dart +++ b/lib/src/in_app_webview/android/in_app_webview_controller.dart @@ -9,7 +9,8 @@ import '../in_app_webview_controller.dart'; class AndroidInAppWebViewController { PlatformInAppWebViewController? _controller; - AndroidInAppWebViewController({required PlatformInAppWebViewController controller}) { + AndroidInAppWebViewController( + {required PlatformInAppWebViewController controller}) { this._controller = controller; } diff --git a/lib/src/main.dart b/lib/src/main.dart index 4aac9fee..2b968fee 100644 --- a/lib/src/main.dart +++ b/lib/src/main.dart @@ -14,4 +14,4 @@ export 'proxy_controller.dart'; export 'webview_asset_loader.dart'; export 'tracing_controller.dart'; export 'process_global_config.dart'; -export 'in_app_localhost_server.dart'; \ No newline at end of file +export 'in_app_localhost_server.dart'; diff --git a/lib/src/print_job/print_job_controller.dart b/lib/src/print_job/print_job_controller.dart index ec014886..46f7d956 100644 --- a/lib/src/print_job/print_job_controller.dart +++ b/lib/src/print_job/print_job_controller.dart @@ -8,7 +8,6 @@ import '../in_app_webview/in_app_webview_controller.dart'; ///- iOS ///- MacOS class PrintJobController { - PrintJobController({required String id, PrintJobCompletionHandler onComplete}) : this.fromPlatformCreationParams( params: PlatformPrintJobControllerCreationParams( @@ -57,7 +56,8 @@ class PrintJobController { /// ///**Supported Platforms/Implementations**: ///- iOS - Future dismiss({bool animated = true}) => platform.dismiss(animated: animated); + Future dismiss({bool animated = true}) => + platform.dismiss(animated: animated); ///Gets the [PrintJobInfo] that describes this job. /// diff --git a/lib/src/process_global_config.dart b/lib/src/process_global_config.dart index dfe9ed7c..504b4499 100644 --- a/lib/src/process_global_config.dart +++ b/lib/src/process_global_config.dart @@ -30,14 +30,14 @@ class ProcessGlobalConfig { /// parameters for a specific platform. ProcessGlobalConfig() : this.fromPlatformCreationParams( - const PlatformProcessGlobalConfigCreationParams(), - ); + const PlatformProcessGlobalConfigCreationParams(), + ); /// Constructs a [ProcessGlobalConfig] from creation params for a specific /// platform. ProcessGlobalConfig.fromPlatformCreationParams( - PlatformProcessGlobalConfigCreationParams params, - ) : this.fromPlatform(PlatformProcessGlobalConfig(params)); + PlatformProcessGlobalConfigCreationParams params, + ) : this.fromPlatform(PlatformProcessGlobalConfig(params)); /// Constructs a [ProcessGlobalConfig] from a specific platform /// implementation. @@ -63,6 +63,6 @@ class ProcessGlobalConfig { /// ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - ProcessGlobalConfig.apply](https://developer.android.com/reference/androidx/webkit/ProcessGlobalConfig#apply(androidx.webkit.ProcessGlobalConfig))) - Future apply({required ProcessGlobalConfigSettings settings}) => platform.apply(settings: settings); + Future apply({required ProcessGlobalConfigSettings settings}) => + platform.apply(settings: settings); } - diff --git a/lib/src/proxy_controller.dart b/lib/src/proxy_controller.dart index 7ccb555f..82a88114 100644 --- a/lib/src/proxy_controller.dart +++ b/lib/src/proxy_controller.dart @@ -18,14 +18,14 @@ class ProxyController { /// parameters for a specific platform. ProxyController() : this.fromPlatformCreationParams( - const PlatformProxyControllerCreationParams(), - ); + const PlatformProxyControllerCreationParams(), + ); /// Constructs a [ProxyController] from creation params for a specific /// platform. ProxyController.fromPlatformCreationParams( - PlatformProxyControllerCreationParams params, - ) : this.fromPlatform(PlatformProxyController(params)); + PlatformProxyControllerCreationParams params, + ) : this.fromPlatform(PlatformProxyController(params)); /// Constructs a [ProxyController] from a specific platform /// implementation. @@ -51,7 +51,8 @@ class ProxyController { /// ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - ProxyController.setProxyOverride](https://developer.android.com/reference/androidx/webkit/ProxyController#setProxyOverride(androidx.webkit.ProxyConfig,%20java.util.concurrent.Executor,%20java.lang.Runnable))) - Future setProxyOverride({required ProxySettings settings}) => platform.setProxyOverride(settings: settings); + Future setProxyOverride({required ProxySettings settings}) => + platform.setProxyOverride(settings: settings); ///Clears the proxy settings. ///Network connections are not guaranteed to immediately use the new proxy setting; wait for the method to return before loading a page. 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 1abfb9d0..7b0b47d2 100644 --- a/lib/src/pull_to_refresh/pull_to_refresh_controller.dart +++ b/lib/src/pull_to_refresh/pull_to_refresh_controller.dart @@ -16,9 +16,6 @@ import '../in_app_browser/in_app_browser.dart'; ///- Android native WebView ///- iOS class PullToRefreshController { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - PullToRefreshController( {void Function()? onRefresh, @Deprecated("Use settings instead") PullToRefreshOptions? options, diff --git a/lib/src/tracing_controller.dart b/lib/src/tracing_controller.dart index cadbb2c2..5afe77cf 100644 --- a/lib/src/tracing_controller.dart +++ b/lib/src/tracing_controller.dart @@ -17,14 +17,14 @@ class TracingController { /// parameters for a specific platform. TracingController() : this.fromPlatformCreationParams( - const PlatformTracingControllerCreationParams(), - ); + const PlatformTracingControllerCreationParams(), + ); /// Constructs a [TracingController] from creation params for a specific /// platform. TracingController.fromPlatformCreationParams( - PlatformTracingControllerCreationParams params, - ) : this.fromPlatform(PlatformTracingController(params)); + PlatformTracingControllerCreationParams params, + ) : this.fromPlatform(PlatformTracingController(params)); /// Constructs a [TracingController] from a specific platform /// implementation. @@ -51,7 +51,8 @@ class TracingController { /// ///**Supported Platforms/Implementations**: ///- Android native WebView ([Official API - TracingController.start](https://developer.android.com/reference/android/webkit/TracingController#start(android.webkit.TracingConfig))) - Future start({required TracingSettings settings}) => platform.start(settings: settings); + Future start({required TracingSettings settings}) => + platform.start(settings: settings); ///Stops tracing and flushes tracing data to the specified output stream. ///The data is sent to the specified output stream in json format typically in diff --git a/lib/src/web_authentication_session/web_authenticate_session.dart b/lib/src/web_authentication_session/web_authenticate_session.dart index dfc4f106..e376e9b7 100755 --- a/lib/src/web_authentication_session/web_authenticate_session.dart +++ b/lib/src/web_authentication_session/web_authenticate_session.dart @@ -26,9 +26,6 @@ import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_pla ///- iOS ///- MacOS class WebAuthenticationSession { - ///Debug settings. - static DebugLoggingSettings debugLoggingSettings = DebugLoggingSettings(); - WebAuthenticationSession( {required WebUri url, String? callbackURLScheme, diff --git a/package.json b/package.json index 76a4d5b8..3f04710c 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "watch": "flutter pub run build_runner watch --delete-conflicting-outputs", "publish:dry": "flutter pub publish --dry-run", "publish": "flutter pub publish", - "format": "dart format lib example/integration_test", + "format": "dart format lib example/integration_test flutter_inappwebview_platform_interface/lib flutter_inappwebview_android/lib", "build:publish": "npm run format && npm run build && flutter pub publish", "docs:gen": "flutter pub global activate dartdoc && flutter pub global run dartdoc:dartdoc", "docs:serve": "flutter pub global activate dhttpd && flutter pub global run dhttpd:dhttpd --path doc/api"