updated analysis options

This commit is contained in:
Lorenzo Pichilli 2023-11-27 18:41:59 +01:00
parent c743fb4b0d
commit 26f0235c98
13 changed files with 129 additions and 47 deletions

View File

@ -11,3 +11,5 @@ analyzer:
errors: errors:
deprecated_member_use: ignore deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -12,3 +12,13 @@ include: package:flutter_lints/flutter.yaml
linter: linter:
rules: rules:
constant_identifier_names: ignore constant_identifier_names: ignore
deprecated_member_use_from_same_package: ignore
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
errors:
deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -11,3 +11,5 @@ analyzer:
errors: errors:
deprecated_member_use: ignore deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -11,3 +11,5 @@ analyzer:
errors: errors:
deprecated_member_use: ignore deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';

View File

@ -56,7 +56,7 @@ class IOSPrintJobController extends PlatformPrintJobController
} }
@override @override
Future<void> dismiss({bool animated: true}) async { Future<void> dismiss({bool animated = true}) async {
Map<String, dynamic> args = <String, dynamic>{}; Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent("animated", () => animated); args.putIfAbsent("animated", () => animated);
await channel?.invokeMethod('dismiss', args); await channel?.invokeMethod('dismiss', args);

View File

@ -11,3 +11,5 @@ analyzer:
errors: errors:
deprecated_member_use: ignore deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -1,4 +1,3 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';

View File

@ -11,3 +11,5 @@ analyzer:
errors: errors:
deprecated_member_use: ignore deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -1,7 +0,0 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_platform_interface.dart';
void main() {
}

View File

@ -11,3 +11,5 @@ analyzer:
errors: errors:
deprecated_member_use: ignore deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore deprecated_member_use_from_same_package: ignore
unnecessary_cast: ignore
unnecessary_import: ignore

View File

@ -190,22 +190,30 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
void dispose() => platform.dispose(); void dispose() => platform.dispose();
@override @override
Future<FormResubmissionAction?>? androidOnFormResubmission(Uri? url) {} Future<FormResubmissionAction?>? androidOnFormResubmission(Uri? url) {
return null;
}
@override @override
void androidOnGeolocationPermissionsHidePrompt() {} void androidOnGeolocationPermissionsHidePrompt() {}
@override @override
Future<GeolocationPermissionShowPromptResponse?>? Future<GeolocationPermissionShowPromptResponse?>?
androidOnGeolocationPermissionsShowPrompt(String origin) {} androidOnGeolocationPermissionsShowPrompt(String origin) {
return null;
}
@override @override
Future<JsBeforeUnloadResponse?>? androidOnJsBeforeUnload( Future<JsBeforeUnloadResponse?>? androidOnJsBeforeUnload(
JsBeforeUnloadRequest jsBeforeUnloadRequest) {} JsBeforeUnloadRequest jsBeforeUnloadRequest) {
return null;
}
@override @override
Future<PermissionRequestResponse?>? androidOnPermissionRequest( Future<PermissionRequestResponse?>? androidOnPermissionRequest(
String origin, List<String> resources) {} String origin, List<String> resources) {
return null;
}
@override @override
void androidOnReceivedIcon(Uint8List icon) {} void androidOnReceivedIcon(Uint8List icon) {}
@ -221,42 +229,58 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@override @override
Future<WebViewRenderProcessAction?>? androidOnRenderProcessResponsive( Future<WebViewRenderProcessAction?>? androidOnRenderProcessResponsive(
Uri? url) {} Uri? url) {
return null;
}
@override @override
Future<WebViewRenderProcessAction?>? androidOnRenderProcessUnresponsive( Future<WebViewRenderProcessAction?>? androidOnRenderProcessUnresponsive(
Uri? url) {} Uri? url) {
return null;
}
@override @override
Future<SafeBrowsingResponse?>? androidOnSafeBrowsingHit( Future<SafeBrowsingResponse?>? androidOnSafeBrowsingHit(
Uri url, SafeBrowsingThreat? threatType) {} Uri url, SafeBrowsingThreat? threatType) {
return null;
}
@override @override
void androidOnScaleChanged(double oldScale, double newScale) {} void androidOnScaleChanged(double oldScale, double newScale) {}
@override @override
Future<WebResourceResponse?>? androidShouldInterceptRequest( Future<WebResourceResponse?>? androidShouldInterceptRequest(
WebResourceRequest request) {} WebResourceRequest request) {
return null;
}
@override @override
void iosOnDidReceiveServerRedirectForProvisionalNavigation() {} void iosOnDidReceiveServerRedirectForProvisionalNavigation() {}
@override @override
Future<IOSNavigationResponseAction?>? iosOnNavigationResponse( Future<IOSNavigationResponseAction?>? iosOnNavigationResponse(
IOSWKNavigationResponse navigationResponse) {} IOSWKNavigationResponse navigationResponse) {
return null;
}
@override @override
void iosOnWebContentProcessDidTerminate() {} void iosOnWebContentProcessDidTerminate() {}
@override @override
Future<IOSShouldAllowDeprecatedTLSAction?>? iosShouldAllowDeprecatedTLS( Future<IOSShouldAllowDeprecatedTLSAction?>? iosShouldAllowDeprecatedTLS(
URLAuthenticationChallenge challenge) {} URLAuthenticationChallenge challenge) {
return null;
}
@override @override
Future<AjaxRequestAction?>? onAjaxProgress(AjaxRequest ajaxRequest) {} Future<AjaxRequestAction?>? onAjaxProgress(AjaxRequest ajaxRequest) {
return null;
}
@override @override
Future<AjaxRequestAction?>? onAjaxReadyStateChange(AjaxRequest ajaxRequest) {} Future<AjaxRequestAction?>? onAjaxReadyStateChange(AjaxRequest ajaxRequest) {
return null;
}
@override @override
void onBrowserCreated() {} void onBrowserCreated() {}
@ -275,7 +299,9 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
void onContentSizeChanged(Size oldContentSize, Size newContentSize) {} void onContentSizeChanged(Size oldContentSize, Size newContentSize) {}
@override @override
Future<bool?>? onCreateWindow(CreateWindowAction createWindowAction) {} Future<bool?>? onCreateWindow(CreateWindowAction createWindowAction) {
return null;
}
@override @override
void onDidReceiveServerRedirectForProvisionalNavigation() {} void onDidReceiveServerRedirectForProvisionalNavigation() {}
@ -300,27 +326,39 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting) {} int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting) {}
@override @override
Future<FormResubmissionAction?>? onFormResubmission(WebUri? url) {} Future<FormResubmissionAction?>? onFormResubmission(WebUri? url) {
return null;
}
@override @override
void onGeolocationPermissionsHidePrompt() {} void onGeolocationPermissionsHidePrompt() {}
@override @override
Future<GeolocationPermissionShowPromptResponse?>? Future<GeolocationPermissionShowPromptResponse?>?
onGeolocationPermissionsShowPrompt(String origin) {} onGeolocationPermissionsShowPrompt(String origin) {
return null;
}
@override @override
Future<JsAlertResponse?>? onJsAlert(JsAlertRequest jsAlertRequest) {} Future<JsAlertResponse?>? onJsAlert(JsAlertRequest jsAlertRequest) {
return null;
}
@override @override
Future<JsBeforeUnloadResponse?>? onJsBeforeUnload( Future<JsBeforeUnloadResponse?>? onJsBeforeUnload(
JsBeforeUnloadRequest jsBeforeUnloadRequest) {} JsBeforeUnloadRequest jsBeforeUnloadRequest) {
return null;
}
@override @override
Future<JsConfirmResponse?>? onJsConfirm(JsConfirmRequest jsConfirmRequest) {} Future<JsConfirmResponse?>? onJsConfirm(JsConfirmRequest jsConfirmRequest) {
return null;
}
@override @override
Future<JsPromptResponse?>? onJsPrompt(JsPromptRequest jsPromptRequest) {} Future<JsPromptResponse?>? onJsPrompt(JsPromptRequest jsPromptRequest) {
return null;
}
@override @override
void onLoadError(Uri? url, int code, String message) {} void onLoadError(Uri? url, int code, String message) {}
@ -332,11 +370,15 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
void onLoadResource(LoadedResource resource) {} void onLoadResource(LoadedResource resource) {}
@override @override
Future<CustomSchemeResponse?>? onLoadResourceCustomScheme(Uri url) {} Future<CustomSchemeResponse?>? onLoadResourceCustomScheme(Uri url) {
return null;
}
@override @override
Future<CustomSchemeResponse?>? onLoadResourceWithCustomScheme( Future<CustomSchemeResponse?>? onLoadResourceWithCustomScheme(
WebResourceRequest request) {} WebResourceRequest request) {
return null;
}
@override @override
void onLoadStart(WebUri? url) {} void onLoadStart(WebUri? url) {}
@ -353,7 +395,9 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@override @override
Future<NavigationResponseAction?>? onNavigationResponse( Future<NavigationResponseAction?>? onNavigationResponse(
NavigationResponse navigationResponse) {} NavigationResponse navigationResponse) {
return null;
}
@override @override
void onOverScrolled(int x, int y, bool clampedX, bool clampedY) {} void onOverScrolled(int x, int y, bool clampedX, bool clampedY) {}
@ -363,7 +407,9 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@override @override
Future<PermissionResponse?>? onPermissionRequest( Future<PermissionResponse?>? onPermissionRequest(
PermissionRequest permissionRequest) {} PermissionRequest permissionRequest) {
return null;
}
@override @override
void onPermissionRequestCanceled(PermissionRequest permissionRequest) {} void onPermissionRequestCanceled(PermissionRequest permissionRequest) {}
@ -373,21 +419,27 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@override @override
Future<bool?>? onPrintRequest( Future<bool?>? onPrintRequest(
WebUri? url, PlatformPrintJobController? printJobController) {} WebUri? url, PlatformPrintJobController? printJobController) {
return null;
}
@override @override
void onProgressChanged(int progress) {} void onProgressChanged(int progress) {}
@override @override
Future<ClientCertResponse?>? onReceivedClientCertRequest( Future<ClientCertResponse?>? onReceivedClientCertRequest(
URLAuthenticationChallenge challenge) {} URLAuthenticationChallenge challenge) {
return null;
}
@override @override
void onReceivedError(WebResourceRequest request, WebResourceError error) {} void onReceivedError(WebResourceRequest request, WebResourceError error) {}
@override @override
Future<HttpAuthResponse?>? onReceivedHttpAuthRequest( Future<HttpAuthResponse?>? onReceivedHttpAuthRequest(
URLAuthenticationChallenge challenge) {} URLAuthenticationChallenge challenge) {
return null;
}
@override @override
void onReceivedHttpError( void onReceivedHttpError(
@ -401,7 +453,9 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@override @override
Future<ServerTrustAuthResponse?>? onReceivedServerTrustAuthRequest( Future<ServerTrustAuthResponse?>? onReceivedServerTrustAuthRequest(
URLAuthenticationChallenge challenge) {} URLAuthenticationChallenge challenge) {
return null;
}
@override @override
void onReceivedTouchIconUrl(WebUri url, bool precomposed) {} void onReceivedTouchIconUrl(WebUri url, bool precomposed) {}
@ -410,18 +464,24 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
void onRenderProcessGone(RenderProcessGoneDetail detail) {} void onRenderProcessGone(RenderProcessGoneDetail detail) {}
@override @override
Future<WebViewRenderProcessAction?>? onRenderProcessResponsive(WebUri? url) {} Future<WebViewRenderProcessAction?>? onRenderProcessResponsive(WebUri? url) {
return null;
}
@override @override
Future<WebViewRenderProcessAction?>? onRenderProcessUnresponsive( Future<WebViewRenderProcessAction?>? onRenderProcessUnresponsive(
WebUri? url) {} WebUri? url) {
return null;
}
@override @override
void onRequestFocus() {} void onRequestFocus() {}
@override @override
Future<SafeBrowsingResponse?>? onSafeBrowsingHit( Future<SafeBrowsingResponse?>? onSafeBrowsingHit(
WebUri url, SafeBrowsingThreat? threatType) {} WebUri url, SafeBrowsingThreat? threatType) {
return null;
}
@override @override
void onScrollChanged(int x, int y) {} void onScrollChanged(int x, int y) {}
@ -446,20 +506,30 @@ class InAppBrowser implements PlatformInAppBrowserEvents {
@override @override
Future<ShouldAllowDeprecatedTLSAction?>? shouldAllowDeprecatedTLS( Future<ShouldAllowDeprecatedTLSAction?>? shouldAllowDeprecatedTLS(
URLAuthenticationChallenge challenge) {} URLAuthenticationChallenge challenge) {
return null;
}
@override @override
Future<AjaxRequest?>? shouldInterceptAjaxRequest(AjaxRequest ajaxRequest) {} Future<AjaxRequest?>? shouldInterceptAjaxRequest(AjaxRequest ajaxRequest) {
return null;
}
@override @override
Future<FetchRequest?>? shouldInterceptFetchRequest( Future<FetchRequest?>? shouldInterceptFetchRequest(
FetchRequest fetchRequest) {} FetchRequest fetchRequest) {
return null;
}
@override @override
Future<WebResourceResponse?>? shouldInterceptRequest( Future<WebResourceResponse?>? shouldInterceptRequest(
WebResourceRequest request) {} WebResourceRequest request) {
return null;
}
@override @override
Future<NavigationActionPolicy?>? shouldOverrideUrlLoading( Future<NavigationActionPolicy?>? shouldOverrideUrlLoading(
NavigationAction navigationAction) {} NavigationAction navigationAction) {
return null;
}
} }

View File

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_platform_interface.dart'; import 'package:flutter_inappwebview_platform_interface/flutter_inappwebview_platform_interface.dart';
import '../in_app_browser/in_app_browser.dart';
///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController} ///{@macro flutter_inappwebview_platform_interface.PlatformPullToRefreshController}
class PullToRefreshController { class PullToRefreshController {