code format
This commit is contained in:
parent
18c3c1fa51
commit
d5a0bb3e3e
|
@ -295,7 +295,8 @@ class ChromeSafariBrowser extends ChannelController {
|
|||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('relation', () => relation.toNativeValue());
|
||||
args.putIfAbsent('origin', () => origin.toString());
|
||||
return await channel?.invokeMethod<bool>("validateRelationship", args) ?? false;
|
||||
return await channel?.invokeMethod<bool>("validateRelationship", args) ??
|
||||
false;
|
||||
}
|
||||
|
||||
///Closes the [ChromeSafariBrowser] instance.
|
||||
|
@ -401,7 +402,8 @@ class ChromeSafariBrowser extends ChannelController {
|
|||
///- Android
|
||||
static Future<int> getMaxToolbarItems() async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
return await _sharedChannel.invokeMethod<int>("getMaxToolbarItems", args) ?? 0;
|
||||
return await _sharedChannel.invokeMethod<int>("getMaxToolbarItems", args) ??
|
||||
0;
|
||||
}
|
||||
|
||||
///Clear associated website data accrued from browsing activity within your app.
|
||||
|
|
|
@ -92,7 +92,7 @@ class CookieManager {
|
|||
bool? isHttpOnly,
|
||||
HTTPCookieSameSitePolicy? sameSite,
|
||||
@Deprecated("Use webViewController instead")
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? webViewController}) async {
|
||||
webViewController = webViewController ?? iosBelow11WebViewController;
|
||||
|
||||
|
@ -204,7 +204,7 @@ class CookieManager {
|
|||
Future<List<Cookie>> getCookies(
|
||||
{required WebUri url,
|
||||
@Deprecated("Use webViewController instead")
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? webViewController}) async {
|
||||
assert(url.toString().isNotEmpty);
|
||||
|
||||
|
@ -318,7 +318,7 @@ class CookieManager {
|
|||
{required WebUri url,
|
||||
required String name,
|
||||
@Deprecated("Use webViewController instead")
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? webViewController}) async {
|
||||
assert(url.toString().isNotEmpty);
|
||||
assert(name.isNotEmpty);
|
||||
|
@ -381,7 +381,7 @@ class CookieManager {
|
|||
String path = "/",
|
||||
String? domain,
|
||||
@Deprecated("Use webViewController instead")
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? webViewController}) async {
|
||||
assert(url.toString().isNotEmpty);
|
||||
assert(name.isNotEmpty);
|
||||
|
@ -433,7 +433,7 @@ class CookieManager {
|
|||
String path = "/",
|
||||
String? domain,
|
||||
@Deprecated("Use webViewController instead")
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? iosBelow11WebViewController,
|
||||
InAppWebViewController? webViewController}) async {
|
||||
assert(url.toString().isNotEmpty);
|
||||
|
||||
|
|
|
@ -70,8 +70,7 @@ class InAppBrowser extends ChannelController {
|
|||
}
|
||||
|
||||
_init() {
|
||||
channel =
|
||||
MethodChannel('com.pichillilorenzo/flutter_inappbrowser_$id');
|
||||
channel = MethodChannel('com.pichillilorenzo/flutter_inappbrowser_$id');
|
||||
handler = _handleMethod;
|
||||
initMethodCallHandler();
|
||||
|
||||
|
|
|
@ -86,7 +86,9 @@ class InAppLocalhostServer {
|
|||
path = _documentRoot + path;
|
||||
|
||||
try {
|
||||
body = (await rootBundle.load(Uri.decodeFull(path))).buffer.asUint8List();
|
||||
body = (await rootBundle.load(Uri.decodeFull(path)))
|
||||
.buffer
|
||||
.asUint8List();
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
request.response.close();
|
||||
|
|
|
@ -26,8 +26,8 @@ class IOSInAppWebViewController {
|
|||
@Deprecated("Use InAppWebViewController.createPdf instead")
|
||||
Future<Uint8List?> createPdf(
|
||||
{@Deprecated("Use pdfConfiguration instead")
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKPDFConfiguration? iosWKPdfConfiguration,
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKPDFConfiguration? iosWKPdfConfiguration,
|
||||
PDFConfiguration? pdfConfiguration}) async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
args.putIfAbsent('pdfConfiguration',
|
||||
|
|
|
@ -29,7 +29,8 @@ import '../types/disposable.dart';
|
|||
///- Web
|
||||
///- MacOS
|
||||
///{@endtemplate}
|
||||
class HeadlessInAppWebView extends ChannelController implements WebView, Disposable {
|
||||
class HeadlessInAppWebView extends ChannelController
|
||||
implements WebView, Disposable {
|
||||
///View ID.
|
||||
late final String id;
|
||||
|
||||
|
@ -68,8 +69,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
|||
this.initialUrlRequest,
|
||||
this.initialFile,
|
||||
this.initialData,
|
||||
@Deprecated('Use initialSettings instead')
|
||||
this.initialOptions,
|
||||
@Deprecated('Use initialSettings instead') this.initialOptions,
|
||||
this.initialSettings,
|
||||
this.contextMenu,
|
||||
this.initialUserScripts,
|
||||
|
@ -78,22 +78,19 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
|||
this.onWebViewCreated,
|
||||
this.onLoadStart,
|
||||
this.onLoadStop,
|
||||
@Deprecated("Use onReceivedError instead")
|
||||
this.onLoadError,
|
||||
@Deprecated("Use onReceivedError instead") this.onLoadError,
|
||||
this.onReceivedError,
|
||||
@Deprecated("Use onReceivedHttpError instead")
|
||||
this.onLoadHttpError,
|
||||
@Deprecated("Use onReceivedHttpError instead") this.onLoadHttpError,
|
||||
this.onReceivedHttpError,
|
||||
this.onProgressChanged,
|
||||
this.onConsoleMessage,
|
||||
this.shouldOverrideUrlLoading,
|
||||
this.onLoadResource,
|
||||
this.onScrollChanged,
|
||||
@Deprecated('Use onDownloadStartRequest instead')
|
||||
this.onDownloadStart,
|
||||
@Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart,
|
||||
this.onDownloadStartRequest,
|
||||
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
||||
this.onLoadResourceCustomScheme,
|
||||
this.onLoadResourceCustomScheme,
|
||||
this.onLoadResourceWithCustomScheme,
|
||||
this.onCreateWindow,
|
||||
this.onCloseWindow,
|
||||
|
@ -104,14 +101,13 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
|||
this.onReceivedServerTrustAuthRequest,
|
||||
this.onReceivedClientCertRequest,
|
||||
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
||||
this.onFindResultReceived,
|
||||
this.onFindResultReceived,
|
||||
this.shouldInterceptAjaxRequest,
|
||||
this.onAjaxReadyStateChange,
|
||||
this.onAjaxProgress,
|
||||
this.shouldInterceptFetchRequest,
|
||||
this.onUpdateVisitedHistory,
|
||||
@Deprecated("Use onPrintRequest instead")
|
||||
this.onPrint,
|
||||
@Deprecated("Use onPrintRequest instead") this.onPrint,
|
||||
this.onPrintRequest,
|
||||
this.onLongPressHitTestResult,
|
||||
this.onEnterFullscreen,
|
||||
|
@ -122,59 +118,57 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
|||
this.onWindowBlur,
|
||||
this.onOverScrolled,
|
||||
@Deprecated('Use onSafeBrowsingHit instead')
|
||||
this.androidOnSafeBrowsingHit,
|
||||
this.androidOnSafeBrowsingHit,
|
||||
this.onSafeBrowsingHit,
|
||||
@Deprecated('Use onPermissionRequest instead')
|
||||
this.androidOnPermissionRequest,
|
||||
this.androidOnPermissionRequest,
|
||||
this.onPermissionRequest,
|
||||
@Deprecated('Use onGeolocationPermissionsShowPrompt instead')
|
||||
this.androidOnGeolocationPermissionsShowPrompt,
|
||||
this.androidOnGeolocationPermissionsShowPrompt,
|
||||
this.onGeolocationPermissionsShowPrompt,
|
||||
@Deprecated('Use onGeolocationPermissionsHidePrompt instead')
|
||||
this.androidOnGeolocationPermissionsHidePrompt,
|
||||
this.androidOnGeolocationPermissionsHidePrompt,
|
||||
this.onGeolocationPermissionsHidePrompt,
|
||||
@Deprecated('Use shouldInterceptRequest instead')
|
||||
this.androidShouldInterceptRequest,
|
||||
this.androidShouldInterceptRequest,
|
||||
this.shouldInterceptRequest,
|
||||
@Deprecated('Use onRenderProcessGone instead')
|
||||
this.androidOnRenderProcessGone,
|
||||
this.androidOnRenderProcessGone,
|
||||
this.onRenderProcessGone,
|
||||
@Deprecated('Use onRenderProcessResponsive instead')
|
||||
this.androidOnRenderProcessResponsive,
|
||||
this.androidOnRenderProcessResponsive,
|
||||
this.onRenderProcessResponsive,
|
||||
@Deprecated('Use onRenderProcessUnresponsive instead')
|
||||
this.androidOnRenderProcessUnresponsive,
|
||||
this.androidOnRenderProcessUnresponsive,
|
||||
this.onRenderProcessUnresponsive,
|
||||
@Deprecated('Use onFormResubmission instead')
|
||||
this.androidOnFormResubmission,
|
||||
this.androidOnFormResubmission,
|
||||
this.onFormResubmission,
|
||||
@Deprecated('Use onZoomScaleChanged instead')
|
||||
this.androidOnScaleChanged,
|
||||
@Deprecated('Use onReceivedIcon instead')
|
||||
this.androidOnReceivedIcon,
|
||||
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||
this.onReceivedIcon,
|
||||
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||
this.androidOnReceivedTouchIconUrl,
|
||||
this.androidOnReceivedTouchIconUrl,
|
||||
this.onReceivedTouchIconUrl,
|
||||
@Deprecated('Use onJsBeforeUnload instead')
|
||||
this.androidOnJsBeforeUnload,
|
||||
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||
this.onJsBeforeUnload,
|
||||
@Deprecated('Use onReceivedLoginRequest instead')
|
||||
this.androidOnReceivedLoginRequest,
|
||||
this.androidOnReceivedLoginRequest,
|
||||
this.onReceivedLoginRequest,
|
||||
this.onPermissionRequestCanceled,
|
||||
this.onRequestFocus,
|
||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||
this.iosOnWebContentProcessDidTerminate,
|
||||
this.iosOnWebContentProcessDidTerminate,
|
||||
this.onWebContentProcessDidTerminate,
|
||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||
@Deprecated(
|
||||
'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||
@Deprecated('Use onNavigationResponse instead')
|
||||
this.iosOnNavigationResponse,
|
||||
this.iosOnNavigationResponse,
|
||||
this.onNavigationResponse,
|
||||
@Deprecated('Use shouldAllowDeprecatedTLS instead')
|
||||
this.iosShouldAllowDeprecatedTLS,
|
||||
this.iosShouldAllowDeprecatedTLS,
|
||||
this.shouldAllowDeprecatedTLS,
|
||||
this.onCameraCaptureStateChanged,
|
||||
this.onMicrophoneCaptureStateChanged,
|
||||
|
@ -364,8 +358,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
|||
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
Map<String, dynamic> sizeMap =
|
||||
(await channel?.invokeMethod('getSize', args))
|
||||
?.cast<String, dynamic>();
|
||||
(await channel?.invokeMethod('getSize', args))?.cast<String, dynamic>();
|
||||
return MapSize.fromMap(sizeMap);
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ class InAppWebView extends StatefulWidget implements WebView {
|
|||
@Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart,
|
||||
this.onDownloadStartRequest,
|
||||
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
||||
this.onLoadResourceCustomScheme,
|
||||
this.onLoadResourceCustomScheme,
|
||||
this.onLoadResourceWithCustomScheme,
|
||||
this.onCreateWindow,
|
||||
this.onCloseWindow,
|
||||
|
@ -112,7 +112,7 @@ class InAppWebView extends StatefulWidget implements WebView {
|
|||
this.onReceivedServerTrustAuthRequest,
|
||||
this.onReceivedClientCertRequest,
|
||||
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
||||
this.onFindResultReceived,
|
||||
this.onFindResultReceived,
|
||||
this.shouldInterceptAjaxRequest,
|
||||
this.onAjaxReadyStateChange,
|
||||
this.onAjaxProgress,
|
||||
|
@ -132,53 +132,54 @@ class InAppWebView extends StatefulWidget implements WebView {
|
|||
@Deprecated('Use onSafeBrowsingHit instead') this.androidOnSafeBrowsingHit,
|
||||
this.onSafeBrowsingHit,
|
||||
@Deprecated('Use onPermissionRequest instead')
|
||||
this.androidOnPermissionRequest,
|
||||
this.androidOnPermissionRequest,
|
||||
this.onPermissionRequest,
|
||||
@Deprecated('Use onGeolocationPermissionsShowPrompt instead')
|
||||
this.androidOnGeolocationPermissionsShowPrompt,
|
||||
this.androidOnGeolocationPermissionsShowPrompt,
|
||||
this.onGeolocationPermissionsShowPrompt,
|
||||
@Deprecated('Use onGeolocationPermissionsHidePrompt instead')
|
||||
this.androidOnGeolocationPermissionsHidePrompt,
|
||||
this.androidOnGeolocationPermissionsHidePrompt,
|
||||
this.onGeolocationPermissionsHidePrompt,
|
||||
@Deprecated('Use shouldInterceptRequest instead')
|
||||
this.androidShouldInterceptRequest,
|
||||
this.androidShouldInterceptRequest,
|
||||
this.shouldInterceptRequest,
|
||||
@Deprecated('Use onRenderProcessGone instead')
|
||||
this.androidOnRenderProcessGone,
|
||||
this.androidOnRenderProcessGone,
|
||||
this.onRenderProcessGone,
|
||||
@Deprecated('Use onRenderProcessResponsive instead')
|
||||
this.androidOnRenderProcessResponsive,
|
||||
this.androidOnRenderProcessResponsive,
|
||||
this.onRenderProcessResponsive,
|
||||
@Deprecated('Use onRenderProcessUnresponsive instead')
|
||||
this.androidOnRenderProcessUnresponsive,
|
||||
this.androidOnRenderProcessUnresponsive,
|
||||
this.onRenderProcessUnresponsive,
|
||||
@Deprecated('Use onFormResubmission instead')
|
||||
this.androidOnFormResubmission,
|
||||
this.androidOnFormResubmission,
|
||||
this.onFormResubmission,
|
||||
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||
this.onReceivedIcon,
|
||||
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||
this.androidOnReceivedTouchIconUrl,
|
||||
this.androidOnReceivedTouchIconUrl,
|
||||
this.onReceivedTouchIconUrl,
|
||||
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||
this.onJsBeforeUnload,
|
||||
@Deprecated('Use onReceivedLoginRequest instead')
|
||||
this.androidOnReceivedLoginRequest,
|
||||
this.androidOnReceivedLoginRequest,
|
||||
this.onReceivedLoginRequest,
|
||||
this.onPermissionRequestCanceled,
|
||||
this.onRequestFocus,
|
||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||
this.iosOnWebContentProcessDidTerminate,
|
||||
this.iosOnWebContentProcessDidTerminate,
|
||||
this.onWebContentProcessDidTerminate,
|
||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||
@Deprecated(
|
||||
'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||
@Deprecated('Use onNavigationResponse instead')
|
||||
this.iosOnNavigationResponse,
|
||||
this.iosOnNavigationResponse,
|
||||
this.onNavigationResponse,
|
||||
@Deprecated('Use shouldAllowDeprecatedTLS instead')
|
||||
this.iosShouldAllowDeprecatedTLS,
|
||||
this.iosShouldAllowDeprecatedTLS,
|
||||
this.shouldAllowDeprecatedTLS,
|
||||
this.onCameraCaptureStateChanged,
|
||||
this.onMicrophoneCaptureStateChanged,
|
||||
|
|
|
@ -1197,22 +1197,19 @@ abstract class WebView {
|
|||
this.onWebViewCreated,
|
||||
this.onLoadStart,
|
||||
this.onLoadStop,
|
||||
@Deprecated('Use onReceivedError instead')
|
||||
this.onLoadError,
|
||||
@Deprecated('Use onReceivedError instead') this.onLoadError,
|
||||
this.onReceivedError,
|
||||
@Deprecated("Use onReceivedHttpError instead")
|
||||
this.onLoadHttpError,
|
||||
@Deprecated("Use onReceivedHttpError instead") this.onLoadHttpError,
|
||||
this.onReceivedHttpError,
|
||||
this.onProgressChanged,
|
||||
this.onConsoleMessage,
|
||||
this.shouldOverrideUrlLoading,
|
||||
this.onLoadResource,
|
||||
this.onScrollChanged,
|
||||
@Deprecated('Use onDownloadStartRequest instead')
|
||||
this.onDownloadStart,
|
||||
@Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart,
|
||||
this.onDownloadStartRequest,
|
||||
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
||||
this.onLoadResourceCustomScheme,
|
||||
this.onLoadResourceCustomScheme,
|
||||
this.onLoadResourceWithCustomScheme,
|
||||
this.onCreateWindow,
|
||||
this.onCloseWindow,
|
||||
|
@ -1223,14 +1220,13 @@ abstract class WebView {
|
|||
this.onReceivedServerTrustAuthRequest,
|
||||
this.onReceivedClientCertRequest,
|
||||
@Deprecated('Use FindInteractionController.onFindResultReceived instead')
|
||||
this.onFindResultReceived,
|
||||
this.onFindResultReceived,
|
||||
this.shouldInterceptAjaxRequest,
|
||||
this.onAjaxReadyStateChange,
|
||||
this.onAjaxProgress,
|
||||
this.shouldInterceptFetchRequest,
|
||||
this.onUpdateVisitedHistory,
|
||||
@Deprecated("Use onPrintRequest instead")
|
||||
this.onPrint,
|
||||
@Deprecated("Use onPrintRequest instead") this.onPrint,
|
||||
this.onPrintRequest,
|
||||
this.onLongPressHitTestResult,
|
||||
this.onEnterFullscreen,
|
||||
|
@ -1242,59 +1238,57 @@ abstract class WebView {
|
|||
this.onOverScrolled,
|
||||
this.onZoomScaleChanged,
|
||||
@Deprecated('Use onSafeBrowsingHit instead')
|
||||
this.androidOnSafeBrowsingHit,
|
||||
this.androidOnSafeBrowsingHit,
|
||||
this.onSafeBrowsingHit,
|
||||
@Deprecated('Use onPermissionRequest instead')
|
||||
this.androidOnPermissionRequest,
|
||||
this.androidOnPermissionRequest,
|
||||
this.onPermissionRequest,
|
||||
@Deprecated('Use onGeolocationPermissionsShowPrompt instead')
|
||||
this.androidOnGeolocationPermissionsShowPrompt,
|
||||
this.androidOnGeolocationPermissionsShowPrompt,
|
||||
this.onGeolocationPermissionsShowPrompt,
|
||||
@Deprecated('Use onGeolocationPermissionsHidePrompt instead')
|
||||
this.androidOnGeolocationPermissionsHidePrompt,
|
||||
this.androidOnGeolocationPermissionsHidePrompt,
|
||||
this.onGeolocationPermissionsHidePrompt,
|
||||
@Deprecated('Use shouldInterceptRequest instead')
|
||||
this.androidShouldInterceptRequest,
|
||||
this.androidShouldInterceptRequest,
|
||||
this.shouldInterceptRequest,
|
||||
@Deprecated('Use onRenderProcessGone instead')
|
||||
this.androidOnRenderProcessGone,
|
||||
this.androidOnRenderProcessGone,
|
||||
this.onRenderProcessGone,
|
||||
@Deprecated('Use onRenderProcessResponsive instead')
|
||||
this.androidOnRenderProcessResponsive,
|
||||
this.androidOnRenderProcessResponsive,
|
||||
this.onRenderProcessResponsive,
|
||||
@Deprecated('Use onRenderProcessUnresponsive instead')
|
||||
this.androidOnRenderProcessUnresponsive,
|
||||
this.androidOnRenderProcessUnresponsive,
|
||||
this.onRenderProcessUnresponsive,
|
||||
@Deprecated('Use onFormResubmission instead')
|
||||
this.androidOnFormResubmission,
|
||||
this.androidOnFormResubmission,
|
||||
this.onFormResubmission,
|
||||
@Deprecated('Use onZoomScaleChanged instead')
|
||||
this.androidOnScaleChanged,
|
||||
@Deprecated('Use onReceivedIcon instead')
|
||||
this.androidOnReceivedIcon,
|
||||
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||
this.onReceivedIcon,
|
||||
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||
this.androidOnReceivedTouchIconUrl,
|
||||
this.androidOnReceivedTouchIconUrl,
|
||||
this.onReceivedTouchIconUrl,
|
||||
@Deprecated('Use onJsBeforeUnload instead')
|
||||
this.androidOnJsBeforeUnload,
|
||||
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||
this.onJsBeforeUnload,
|
||||
@Deprecated('Use onReceivedLoginRequest instead')
|
||||
this.androidOnReceivedLoginRequest,
|
||||
this.androidOnReceivedLoginRequest,
|
||||
this.onReceivedLoginRequest,
|
||||
this.onPermissionRequestCanceled,
|
||||
this.onRequestFocus,
|
||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||
this.iosOnWebContentProcessDidTerminate,
|
||||
this.iosOnWebContentProcessDidTerminate,
|
||||
this.onWebContentProcessDidTerminate,
|
||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||
@Deprecated(
|
||||
'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||
@Deprecated('Use onNavigationResponse instead')
|
||||
this.iosOnNavigationResponse,
|
||||
this.iosOnNavigationResponse,
|
||||
this.onNavigationResponse,
|
||||
@Deprecated('Use shouldAllowDeprecatedTLS instead')
|
||||
this.iosShouldAllowDeprecatedTLS,
|
||||
this.iosShouldAllowDeprecatedTLS,
|
||||
this.shouldAllowDeprecatedTLS,
|
||||
this.onCameraCaptureStateChanged,
|
||||
this.onMicrophoneCaptureStateChanged,
|
||||
|
@ -1302,8 +1296,7 @@ abstract class WebView {
|
|||
this.initialUrlRequest,
|
||||
this.initialFile,
|
||||
this.initialData,
|
||||
@Deprecated('Use initialSettings instead')
|
||||
this.initialOptions,
|
||||
@Deprecated('Use initialSettings instead') this.initialOptions,
|
||||
this.initialSettings,
|
||||
this.contextMenu,
|
||||
this.initialUserScripts,
|
||||
|
|
|
@ -93,8 +93,7 @@ class PrintJobController extends ChannelController {
|
|||
Future<PrintJobInfo?> getInfo() async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
Map<String, dynamic>? infoMap =
|
||||
(await channel?.invokeMethod('getInfo', args))
|
||||
?.cast<String, dynamic>();
|
||||
(await channel?.invokeMethod('getInfo', args))?.cast<String, dynamic>();
|
||||
return PrintJobInfo.fromMap(infoMap);
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,9 @@ class PullToRefreshController extends ChannelController {
|
|||
///- Android native WebView ([Official API - SwipeRefreshLayout.DEFAULT_SLINGSHOT_DISTANCE](https://developer.android.com/reference/androidx/swiperefreshlayout/widget/SwipeRefreshLayout#DEFAULT_SLINGSHOT_DISTANCE()))
|
||||
Future<int> getDefaultSlingshotDistance() async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
return await channel?.invokeMethod<int>('getDefaultSlingshotDistance', args) ?? 0;
|
||||
return await channel?.invokeMethod<int>(
|
||||
'getDefaultSlingshotDistance', args) ??
|
||||
0;
|
||||
}
|
||||
|
||||
///Use [setIndicatorSize] instead.
|
||||
|
|
|
@ -33,7 +33,7 @@ class ClientCertResponse_ {
|
|||
{required this.certificatePath,
|
||||
this.certificatePassword = "",
|
||||
@Deprecated('Use keyStoreType instead')
|
||||
this.androidKeyStoreType = "PKCS12",
|
||||
this.androidKeyStoreType = "PKCS12",
|
||||
this.keyStoreType = "PKCS12",
|
||||
this.action = ClientCertResponseAction_.CANCEL}) {
|
||||
if (this.action == ClientCertResponseAction_.PROCEED)
|
||||
|
|
|
@ -30,7 +30,7 @@ class ClientCertResponse {
|
|||
{required this.certificatePath,
|
||||
this.certificatePassword = "",
|
||||
@Deprecated('Use keyStoreType instead')
|
||||
this.androidKeyStoreType = "PKCS12",
|
||||
this.androidKeyStoreType = "PKCS12",
|
||||
this.keyStoreType = "PKCS12",
|
||||
this.action = ClientCertResponseAction.CANCEL}) {
|
||||
if (this.action == ClientCertResponseAction.PROCEED)
|
||||
|
|
|
@ -42,31 +42,27 @@ class CreateWindowAction_ extends NavigationAction_ {
|
|||
|
||||
CreateWindowAction_(
|
||||
{required this.windowId,
|
||||
@Deprecated('Use isDialog instead')
|
||||
this.androidIsDialog,
|
||||
@Deprecated('Use isDialog instead') this.androidIsDialog,
|
||||
this.isDialog,
|
||||
@Deprecated('Use windowFeatures instead')
|
||||
this.iosWindowFeatures,
|
||||
@Deprecated('Use windowFeatures instead') this.iosWindowFeatures,
|
||||
this.windowFeatures,
|
||||
required URLRequest_ request,
|
||||
required bool isForMainFrame,
|
||||
@Deprecated('Use hasGesture instead')
|
||||
bool? androidHasGesture,
|
||||
@Deprecated('Use isRedirect instead')
|
||||
bool? androidIsRedirect,
|
||||
@Deprecated('Use hasGesture instead') bool? androidHasGesture,
|
||||
@Deprecated('Use isRedirect instead') bool? androidIsRedirect,
|
||||
bool? hasGesture,
|
||||
bool? isRedirect,
|
||||
@Deprecated('Use navigationType instead')
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKNavigationType_? iosWKNavigationType,
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKNavigationType_? iosWKNavigationType,
|
||||
NavigationType_? navigationType,
|
||||
@Deprecated('Use sourceFrame instead')
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKFrameInfo_? iosSourceFrame,
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKFrameInfo_? iosSourceFrame,
|
||||
FrameInfo_? sourceFrame,
|
||||
@Deprecated('Use targetFrame instead')
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKFrameInfo_? iosTargetFrame,
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
IOSWKFrameInfo_? iosTargetFrame,
|
||||
FrameInfo_? targetFrame})
|
||||
: super(
|
||||
request: request,
|
||||
|
|
|
@ -32,29 +32,23 @@ class CreateWindowAction extends NavigationAction {
|
|||
///The window id. Used by [WebView] to create a new WebView.
|
||||
int windowId;
|
||||
CreateWindowAction(
|
||||
{@Deprecated('Use isDialog instead')
|
||||
this.androidIsDialog,
|
||||
@Deprecated('Use windowFeatures instead')
|
||||
this.iosWindowFeatures,
|
||||
{@Deprecated('Use isDialog instead') this.androidIsDialog,
|
||||
@Deprecated('Use windowFeatures instead') this.iosWindowFeatures,
|
||||
this.isDialog,
|
||||
this.windowFeatures,
|
||||
required this.windowId,
|
||||
required URLRequest request,
|
||||
required bool isForMainFrame,
|
||||
@Deprecated('Use hasGesture instead')
|
||||
bool? androidHasGesture,
|
||||
@Deprecated('Use hasGesture instead') bool? androidHasGesture,
|
||||
bool? hasGesture,
|
||||
@Deprecated('Use isRedirect instead')
|
||||
bool? androidIsRedirect,
|
||||
@Deprecated('Use isRedirect instead') bool? androidIsRedirect,
|
||||
bool? isRedirect,
|
||||
@Deprecated('Use navigationType instead')
|
||||
IOSWKNavigationType? iosWKNavigationType,
|
||||
IOSWKNavigationType? iosWKNavigationType,
|
||||
NavigationType? navigationType,
|
||||
@Deprecated('Use sourceFrame instead')
|
||||
IOSWKFrameInfo? iosSourceFrame,
|
||||
@Deprecated('Use sourceFrame instead') IOSWKFrameInfo? iosSourceFrame,
|
||||
FrameInfo? sourceFrame,
|
||||
@Deprecated('Use targetFrame instead')
|
||||
IOSWKFrameInfo? iosTargetFrame,
|
||||
@Deprecated('Use targetFrame instead') IOSWKFrameInfo? iosTargetFrame,
|
||||
FrameInfo? targetFrame,
|
||||
bool? shouldPerformDownload})
|
||||
: super(
|
||||
|
|
|
@ -132,15 +132,13 @@ class URLProtectionSpace_ {
|
|||
this.sslCertificate,
|
||||
this.sslError,
|
||||
@Deprecated("Use authenticationMethod instead")
|
||||
this.iosAuthenticationMethod,
|
||||
this.iosAuthenticationMethod,
|
||||
this.authenticationMethod,
|
||||
@Deprecated("Use distinguishedNames instead")
|
||||
this.iosDistinguishedNames,
|
||||
@Deprecated("Use distinguishedNames instead") this.iosDistinguishedNames,
|
||||
this.distinguishedNames,
|
||||
@Deprecated("Use receivesCredentialSecurely instead")
|
||||
this.iosReceivesCredentialSecurely,
|
||||
this.iosReceivesCredentialSecurely,
|
||||
this.receivesCredentialSecurely,
|
||||
@Deprecated("Use proxyType instead")
|
||||
this.iosProxyType,
|
||||
@Deprecated("Use proxyType instead") this.iosProxyType,
|
||||
this.proxyType});
|
||||
}
|
||||
|
|
|
@ -81,13 +81,11 @@ class URLProtectionSpace {
|
|||
this.distinguishedNames,
|
||||
required this.host,
|
||||
@Deprecated('Use authenticationMethod instead')
|
||||
this.iosAuthenticationMethod,
|
||||
@Deprecated('Use distinguishedNames instead')
|
||||
this.iosDistinguishedNames,
|
||||
@Deprecated('Use proxyType instead')
|
||||
this.iosProxyType,
|
||||
this.iosAuthenticationMethod,
|
||||
@Deprecated('Use distinguishedNames instead') this.iosDistinguishedNames,
|
||||
@Deprecated('Use proxyType instead') this.iosProxyType,
|
||||
@Deprecated('Use receivesCredentialSecurely instead')
|
||||
this.iosReceivesCredentialSecurely,
|
||||
this.iosReceivesCredentialSecurely,
|
||||
this.port,
|
||||
this.protocol,
|
||||
this.proxyType,
|
||||
|
|
|
@ -223,31 +223,27 @@ class URLRequest_ {
|
|||
this.headers,
|
||||
this.body,
|
||||
@Deprecated("Use allowsCellularAccess instead")
|
||||
this.iosAllowsCellularAccess,
|
||||
this.iosAllowsCellularAccess,
|
||||
this.allowsCellularAccess,
|
||||
@Deprecated("Use allowsConstrainedNetworkAccess instead")
|
||||
this.iosAllowsConstrainedNetworkAccess,
|
||||
this.iosAllowsConstrainedNetworkAccess,
|
||||
this.allowsConstrainedNetworkAccess,
|
||||
@Deprecated("Use allowsExpensiveNetworkAccess instead")
|
||||
this.iosAllowsExpensiveNetworkAccess,
|
||||
this.iosAllowsExpensiveNetworkAccess,
|
||||
this.allowsExpensiveNetworkAccess,
|
||||
@Deprecated("Use cachePolicy instead")
|
||||
this.iosCachePolicy,
|
||||
@Deprecated("Use cachePolicy instead") this.iosCachePolicy,
|
||||
this.cachePolicy,
|
||||
@Deprecated("Use httpShouldHandleCookies instead")
|
||||
this.iosHttpShouldHandleCookies,
|
||||
this.iosHttpShouldHandleCookies,
|
||||
this.httpShouldHandleCookies,
|
||||
@Deprecated("Use httpShouldUsePipelining instead")
|
||||
this.iosHttpShouldUsePipelining,
|
||||
this.iosHttpShouldUsePipelining,
|
||||
this.httpShouldUsePipelining,
|
||||
@Deprecated("Use networkServiceType instead")
|
||||
this.iosNetworkServiceType,
|
||||
@Deprecated("Use networkServiceType instead") this.iosNetworkServiceType,
|
||||
this.networkServiceType,
|
||||
@Deprecated("Use timeoutInterval instead")
|
||||
this.iosTimeoutInterval,
|
||||
@Deprecated("Use timeoutInterval instead") this.iosTimeoutInterval,
|
||||
this.timeoutInterval,
|
||||
@Deprecated("Use mainDocumentURL instead")
|
||||
this.iosMainDocumentURL,
|
||||
@Deprecated("Use mainDocumentURL instead") this.iosMainDocumentURL,
|
||||
this.mainDocumentURL,
|
||||
this.assumesHTTP3Capable,
|
||||
this.attribution});
|
||||
|
|
|
@ -151,23 +151,19 @@ class URLRequest {
|
|||
this.httpShouldHandleCookies,
|
||||
this.httpShouldUsePipelining,
|
||||
@Deprecated('Use allowsCellularAccess instead')
|
||||
this.iosAllowsCellularAccess,
|
||||
this.iosAllowsCellularAccess,
|
||||
@Deprecated('Use allowsConstrainedNetworkAccess instead')
|
||||
this.iosAllowsConstrainedNetworkAccess,
|
||||
this.iosAllowsConstrainedNetworkAccess,
|
||||
@Deprecated('Use allowsExpensiveNetworkAccess instead')
|
||||
this.iosAllowsExpensiveNetworkAccess,
|
||||
@Deprecated('Use cachePolicy instead')
|
||||
this.iosCachePolicy,
|
||||
this.iosAllowsExpensiveNetworkAccess,
|
||||
@Deprecated('Use cachePolicy instead') this.iosCachePolicy,
|
||||
@Deprecated('Use httpShouldHandleCookies instead')
|
||||
this.iosHttpShouldHandleCookies,
|
||||
this.iosHttpShouldHandleCookies,
|
||||
@Deprecated('Use httpShouldUsePipelining instead')
|
||||
this.iosHttpShouldUsePipelining,
|
||||
@Deprecated('Use mainDocumentURL instead')
|
||||
this.iosMainDocumentURL,
|
||||
@Deprecated('Use networkServiceType instead')
|
||||
this.iosNetworkServiceType,
|
||||
@Deprecated('Use timeoutInterval instead')
|
||||
this.iosTimeoutInterval,
|
||||
this.iosHttpShouldUsePipelining,
|
||||
@Deprecated('Use mainDocumentURL instead') this.iosMainDocumentURL,
|
||||
@Deprecated('Use networkServiceType instead') this.iosNetworkServiceType,
|
||||
@Deprecated('Use timeoutInterval instead') this.iosTimeoutInterval,
|
||||
this.mainDocumentURL,
|
||||
this.method,
|
||||
this.networkServiceType,
|
||||
|
|
|
@ -594,8 +594,8 @@ abstract class ChannelController implements Disposable {
|
|||
if (controller.disposed) {
|
||||
throw FlutterError(
|
||||
'A ${controller.runtimeType} was used after being disposed.\n'
|
||||
'Once the ${controller.runtimeType} has been disposed, it '
|
||||
'can no longer be used.',
|
||||
'Once the ${controller.runtimeType} has been disposed, it '
|
||||
'can no longer be used.',
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -605,22 +605,25 @@ abstract class ChannelController implements Disposable {
|
|||
}
|
||||
|
||||
extension InternalChannelController on ChannelController {
|
||||
set channel (MethodChannel? channel) => _channel = channel;
|
||||
set channel(MethodChannel? channel) => _channel = channel;
|
||||
|
||||
MethodChannel? get channel {
|
||||
assert(ChannelController.debugAssertNotDisposed(this));
|
||||
return this._channel;
|
||||
}
|
||||
|
||||
set handler (Future<dynamic> Function(MethodCall call)? handler) => _handler = handler;
|
||||
set handler(Future<dynamic> Function(MethodCall call)? handler) =>
|
||||
_handler = handler;
|
||||
|
||||
Future<dynamic> Function(MethodCall call)? get handler => _handler;
|
||||
|
||||
bool get disposed => _channel == null;
|
||||
|
||||
initMethodCallHandler() {
|
||||
assert(channel != null, 'Method Channel for ${runtimeType} not initialized!');
|
||||
assert(handler != null, 'Method Call Handler for ${runtimeType} not initialized!');
|
||||
assert(
|
||||
channel != null, 'Method Channel for ${runtimeType} not initialized!');
|
||||
assert(handler != null,
|
||||
'Method Call Handler for ${runtimeType} not initialized!');
|
||||
|
||||
channel?.setMethodCallHandler((call) async {
|
||||
if (disposed) return null;
|
||||
|
@ -640,4 +643,4 @@ extension InternalChannelController on ChannelController {
|
|||
channel = null;
|
||||
handler = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,6 +186,7 @@ class WebAuthenticationSession extends ChannelController {
|
|||
///- iOS
|
||||
static Future<bool> isAvailable() async {
|
||||
Map<String, dynamic> args = <String, dynamic>{};
|
||||
return await _sharedChannel.invokeMethod<bool>("isAvailable", args) ?? false;
|
||||
return await _sharedChannel.invokeMethod<bool>("isAvailable", args) ??
|
||||
false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class WebMessageListener extends ChannelController {
|
|||
allowedOriginRules != null ? allowedOriginRules : Set.from(["*"]);
|
||||
assert(!this.allowedOriginRules.contains(""),
|
||||
"allowedOriginRules cannot contain empty strings");
|
||||
channel= MethodChannel(
|
||||
channel = MethodChannel(
|
||||
'com.pichillilorenzo/flutter_inappwebview_web_message_listener_${id}_$jsObjectName');
|
||||
handler = _handleMethod;
|
||||
initMethodCallHandler();
|
||||
|
|
Loading…
Reference in New Issue