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>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
args.putIfAbsent('relation', () => relation.toNativeValue());
|
args.putIfAbsent('relation', () => relation.toNativeValue());
|
||||||
args.putIfAbsent('origin', () => origin.toString());
|
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.
|
///Closes the [ChromeSafariBrowser] instance.
|
||||||
|
@ -401,7 +402,8 @@ class ChromeSafariBrowser extends ChannelController {
|
||||||
///- Android
|
///- Android
|
||||||
static Future<int> getMaxToolbarItems() async {
|
static Future<int> getMaxToolbarItems() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
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.
|
///Clear associated website data accrued from browsing activity within your app.
|
||||||
|
|
|
@ -70,8 +70,7 @@ class InAppBrowser extends ChannelController {
|
||||||
}
|
}
|
||||||
|
|
||||||
_init() {
|
_init() {
|
||||||
channel =
|
channel = MethodChannel('com.pichillilorenzo/flutter_inappbrowser_$id');
|
||||||
MethodChannel('com.pichillilorenzo/flutter_inappbrowser_$id');
|
|
||||||
handler = _handleMethod;
|
handler = _handleMethod;
|
||||||
initMethodCallHandler();
|
initMethodCallHandler();
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,9 @@ class InAppLocalhostServer {
|
||||||
path = _documentRoot + path;
|
path = _documentRoot + path;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
body = (await rootBundle.load(Uri.decodeFull(path))).buffer.asUint8List();
|
body = (await rootBundle.load(Uri.decodeFull(path)))
|
||||||
|
.buffer
|
||||||
|
.asUint8List();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e.toString());
|
print(e.toString());
|
||||||
request.response.close();
|
request.response.close();
|
||||||
|
|
|
@ -29,7 +29,8 @@ import '../types/disposable.dart';
|
||||||
///- Web
|
///- Web
|
||||||
///- MacOS
|
///- MacOS
|
||||||
///{@endtemplate}
|
///{@endtemplate}
|
||||||
class HeadlessInAppWebView extends ChannelController implements WebView, Disposable {
|
class HeadlessInAppWebView extends ChannelController
|
||||||
|
implements WebView, Disposable {
|
||||||
///View ID.
|
///View ID.
|
||||||
late final String id;
|
late final String id;
|
||||||
|
|
||||||
|
@ -68,8 +69,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
||||||
this.initialUrlRequest,
|
this.initialUrlRequest,
|
||||||
this.initialFile,
|
this.initialFile,
|
||||||
this.initialData,
|
this.initialData,
|
||||||
@Deprecated('Use initialSettings instead')
|
@Deprecated('Use initialSettings instead') this.initialOptions,
|
||||||
this.initialOptions,
|
|
||||||
this.initialSettings,
|
this.initialSettings,
|
||||||
this.contextMenu,
|
this.contextMenu,
|
||||||
this.initialUserScripts,
|
this.initialUserScripts,
|
||||||
|
@ -78,19 +78,16 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
||||||
this.onWebViewCreated,
|
this.onWebViewCreated,
|
||||||
this.onLoadStart,
|
this.onLoadStart,
|
||||||
this.onLoadStop,
|
this.onLoadStop,
|
||||||
@Deprecated("Use onReceivedError instead")
|
@Deprecated("Use onReceivedError instead") this.onLoadError,
|
||||||
this.onLoadError,
|
|
||||||
this.onReceivedError,
|
this.onReceivedError,
|
||||||
@Deprecated("Use onReceivedHttpError instead")
|
@Deprecated("Use onReceivedHttpError instead") this.onLoadHttpError,
|
||||||
this.onLoadHttpError,
|
|
||||||
this.onReceivedHttpError,
|
this.onReceivedHttpError,
|
||||||
this.onProgressChanged,
|
this.onProgressChanged,
|
||||||
this.onConsoleMessage,
|
this.onConsoleMessage,
|
||||||
this.shouldOverrideUrlLoading,
|
this.shouldOverrideUrlLoading,
|
||||||
this.onLoadResource,
|
this.onLoadResource,
|
||||||
this.onScrollChanged,
|
this.onScrollChanged,
|
||||||
@Deprecated('Use onDownloadStartRequest instead')
|
@Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart,
|
||||||
this.onDownloadStart,
|
|
||||||
this.onDownloadStartRequest,
|
this.onDownloadStartRequest,
|
||||||
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
||||||
this.onLoadResourceCustomScheme,
|
this.onLoadResourceCustomScheme,
|
||||||
|
@ -110,8 +107,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
||||||
this.onAjaxProgress,
|
this.onAjaxProgress,
|
||||||
this.shouldInterceptFetchRequest,
|
this.shouldInterceptFetchRequest,
|
||||||
this.onUpdateVisitedHistory,
|
this.onUpdateVisitedHistory,
|
||||||
@Deprecated("Use onPrintRequest instead")
|
@Deprecated("Use onPrintRequest instead") this.onPrint,
|
||||||
this.onPrint,
|
|
||||||
this.onPrintRequest,
|
this.onPrintRequest,
|
||||||
this.onLongPressHitTestResult,
|
this.onLongPressHitTestResult,
|
||||||
this.onEnterFullscreen,
|
this.onEnterFullscreen,
|
||||||
|
@ -148,16 +144,13 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
||||||
@Deprecated('Use onFormResubmission instead')
|
@Deprecated('Use onFormResubmission instead')
|
||||||
this.androidOnFormResubmission,
|
this.androidOnFormResubmission,
|
||||||
this.onFormResubmission,
|
this.onFormResubmission,
|
||||||
@Deprecated('Use onZoomScaleChanged instead')
|
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||||
this.androidOnScaleChanged,
|
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||||
@Deprecated('Use onReceivedIcon instead')
|
|
||||||
this.androidOnReceivedIcon,
|
|
||||||
this.onReceivedIcon,
|
this.onReceivedIcon,
|
||||||
@Deprecated('Use onReceivedTouchIconUrl instead')
|
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||||
this.androidOnReceivedTouchIconUrl,
|
this.androidOnReceivedTouchIconUrl,
|
||||||
this.onReceivedTouchIconUrl,
|
this.onReceivedTouchIconUrl,
|
||||||
@Deprecated('Use onJsBeforeUnload instead')
|
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||||
this.androidOnJsBeforeUnload,
|
|
||||||
this.onJsBeforeUnload,
|
this.onJsBeforeUnload,
|
||||||
@Deprecated('Use onReceivedLoginRequest instead')
|
@Deprecated('Use onReceivedLoginRequest instead')
|
||||||
this.androidOnReceivedLoginRequest,
|
this.androidOnReceivedLoginRequest,
|
||||||
|
@ -167,7 +160,8 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
||||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
this.iosOnWebContentProcessDidTerminate,
|
this.iosOnWebContentProcessDidTerminate,
|
||||||
this.onWebContentProcessDidTerminate,
|
this.onWebContentProcessDidTerminate,
|
||||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
@Deprecated(
|
||||||
|
'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
@Deprecated('Use onNavigationResponse instead')
|
@Deprecated('Use onNavigationResponse instead')
|
||||||
|
@ -364,8 +358,7 @@ class HeadlessInAppWebView extends ChannelController implements WebView, Disposa
|
||||||
|
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
Map<String, dynamic> sizeMap =
|
Map<String, dynamic> sizeMap =
|
||||||
(await channel?.invokeMethod('getSize', args))
|
(await channel?.invokeMethod('getSize', args))?.cast<String, dynamic>();
|
||||||
?.cast<String, dynamic>();
|
|
||||||
return MapSize.fromMap(sizeMap);
|
return MapSize.fromMap(sizeMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,8 @@ class InAppWebView extends StatefulWidget implements WebView {
|
||||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
this.iosOnWebContentProcessDidTerminate,
|
this.iosOnWebContentProcessDidTerminate,
|
||||||
this.onWebContentProcessDidTerminate,
|
this.onWebContentProcessDidTerminate,
|
||||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
@Deprecated(
|
||||||
|
'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
@Deprecated('Use onNavigationResponse instead')
|
@Deprecated('Use onNavigationResponse instead')
|
||||||
|
|
|
@ -1197,19 +1197,16 @@ abstract class WebView {
|
||||||
this.onWebViewCreated,
|
this.onWebViewCreated,
|
||||||
this.onLoadStart,
|
this.onLoadStart,
|
||||||
this.onLoadStop,
|
this.onLoadStop,
|
||||||
@Deprecated('Use onReceivedError instead')
|
@Deprecated('Use onReceivedError instead') this.onLoadError,
|
||||||
this.onLoadError,
|
|
||||||
this.onReceivedError,
|
this.onReceivedError,
|
||||||
@Deprecated("Use onReceivedHttpError instead")
|
@Deprecated("Use onReceivedHttpError instead") this.onLoadHttpError,
|
||||||
this.onLoadHttpError,
|
|
||||||
this.onReceivedHttpError,
|
this.onReceivedHttpError,
|
||||||
this.onProgressChanged,
|
this.onProgressChanged,
|
||||||
this.onConsoleMessage,
|
this.onConsoleMessage,
|
||||||
this.shouldOverrideUrlLoading,
|
this.shouldOverrideUrlLoading,
|
||||||
this.onLoadResource,
|
this.onLoadResource,
|
||||||
this.onScrollChanged,
|
this.onScrollChanged,
|
||||||
@Deprecated('Use onDownloadStartRequest instead')
|
@Deprecated('Use onDownloadStartRequest instead') this.onDownloadStart,
|
||||||
this.onDownloadStart,
|
|
||||||
this.onDownloadStartRequest,
|
this.onDownloadStartRequest,
|
||||||
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
@Deprecated('Use onLoadResourceWithCustomScheme instead')
|
||||||
this.onLoadResourceCustomScheme,
|
this.onLoadResourceCustomScheme,
|
||||||
|
@ -1229,8 +1226,7 @@ abstract class WebView {
|
||||||
this.onAjaxProgress,
|
this.onAjaxProgress,
|
||||||
this.shouldInterceptFetchRequest,
|
this.shouldInterceptFetchRequest,
|
||||||
this.onUpdateVisitedHistory,
|
this.onUpdateVisitedHistory,
|
||||||
@Deprecated("Use onPrintRequest instead")
|
@Deprecated("Use onPrintRequest instead") this.onPrint,
|
||||||
this.onPrint,
|
|
||||||
this.onPrintRequest,
|
this.onPrintRequest,
|
||||||
this.onLongPressHitTestResult,
|
this.onLongPressHitTestResult,
|
||||||
this.onEnterFullscreen,
|
this.onEnterFullscreen,
|
||||||
|
@ -1268,16 +1264,13 @@ abstract class WebView {
|
||||||
@Deprecated('Use onFormResubmission instead')
|
@Deprecated('Use onFormResubmission instead')
|
||||||
this.androidOnFormResubmission,
|
this.androidOnFormResubmission,
|
||||||
this.onFormResubmission,
|
this.onFormResubmission,
|
||||||
@Deprecated('Use onZoomScaleChanged instead')
|
@Deprecated('Use onZoomScaleChanged instead') this.androidOnScaleChanged,
|
||||||
this.androidOnScaleChanged,
|
@Deprecated('Use onReceivedIcon instead') this.androidOnReceivedIcon,
|
||||||
@Deprecated('Use onReceivedIcon instead')
|
|
||||||
this.androidOnReceivedIcon,
|
|
||||||
this.onReceivedIcon,
|
this.onReceivedIcon,
|
||||||
@Deprecated('Use onReceivedTouchIconUrl instead')
|
@Deprecated('Use onReceivedTouchIconUrl instead')
|
||||||
this.androidOnReceivedTouchIconUrl,
|
this.androidOnReceivedTouchIconUrl,
|
||||||
this.onReceivedTouchIconUrl,
|
this.onReceivedTouchIconUrl,
|
||||||
@Deprecated('Use onJsBeforeUnload instead')
|
@Deprecated('Use onJsBeforeUnload instead') this.androidOnJsBeforeUnload,
|
||||||
this.androidOnJsBeforeUnload,
|
|
||||||
this.onJsBeforeUnload,
|
this.onJsBeforeUnload,
|
||||||
@Deprecated('Use onReceivedLoginRequest instead')
|
@Deprecated('Use onReceivedLoginRequest instead')
|
||||||
this.androidOnReceivedLoginRequest,
|
this.androidOnReceivedLoginRequest,
|
||||||
|
@ -1287,7 +1280,8 @@ abstract class WebView {
|
||||||
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
@Deprecated('Use onWebContentProcessDidTerminate instead')
|
||||||
this.iosOnWebContentProcessDidTerminate,
|
this.iosOnWebContentProcessDidTerminate,
|
||||||
this.onWebContentProcessDidTerminate,
|
this.onWebContentProcessDidTerminate,
|
||||||
@Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
@Deprecated(
|
||||||
|
'Use onDidReceiveServerRedirectForProvisionalNavigation instead')
|
||||||
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
this.onDidReceiveServerRedirectForProvisionalNavigation,
|
||||||
@Deprecated('Use onNavigationResponse instead')
|
@Deprecated('Use onNavigationResponse instead')
|
||||||
|
@ -1302,8 +1296,7 @@ abstract class WebView {
|
||||||
this.initialUrlRequest,
|
this.initialUrlRequest,
|
||||||
this.initialFile,
|
this.initialFile,
|
||||||
this.initialData,
|
this.initialData,
|
||||||
@Deprecated('Use initialSettings instead')
|
@Deprecated('Use initialSettings instead') this.initialOptions,
|
||||||
this.initialOptions,
|
|
||||||
this.initialSettings,
|
this.initialSettings,
|
||||||
this.contextMenu,
|
this.contextMenu,
|
||||||
this.initialUserScripts,
|
this.initialUserScripts,
|
||||||
|
|
|
@ -93,8 +93,7 @@ class PrintJobController extends ChannelController {
|
||||||
Future<PrintJobInfo?> getInfo() async {
|
Future<PrintJobInfo?> getInfo() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
Map<String, dynamic>? infoMap =
|
Map<String, dynamic>? infoMap =
|
||||||
(await channel?.invokeMethod('getInfo', args))
|
(await channel?.invokeMethod('getInfo', args))?.cast<String, dynamic>();
|
||||||
?.cast<String, dynamic>();
|
|
||||||
return PrintJobInfo.fromMap(infoMap);
|
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()))
|
///- 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 {
|
Future<int> getDefaultSlingshotDistance() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
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.
|
///Use [setIndicatorSize] instead.
|
||||||
|
|
|
@ -42,18 +42,14 @@ class CreateWindowAction_ extends NavigationAction_ {
|
||||||
|
|
||||||
CreateWindowAction_(
|
CreateWindowAction_(
|
||||||
{required this.windowId,
|
{required this.windowId,
|
||||||
@Deprecated('Use isDialog instead')
|
@Deprecated('Use isDialog instead') this.androidIsDialog,
|
||||||
this.androidIsDialog,
|
|
||||||
this.isDialog,
|
this.isDialog,
|
||||||
@Deprecated('Use windowFeatures instead')
|
@Deprecated('Use windowFeatures instead') this.iosWindowFeatures,
|
||||||
this.iosWindowFeatures,
|
|
||||||
this.windowFeatures,
|
this.windowFeatures,
|
||||||
required URLRequest_ request,
|
required URLRequest_ request,
|
||||||
required bool isForMainFrame,
|
required bool isForMainFrame,
|
||||||
@Deprecated('Use hasGesture instead')
|
@Deprecated('Use hasGesture instead') bool? androidHasGesture,
|
||||||
bool? androidHasGesture,
|
@Deprecated('Use isRedirect instead') bool? androidIsRedirect,
|
||||||
@Deprecated('Use isRedirect instead')
|
|
||||||
bool? androidIsRedirect,
|
|
||||||
bool? hasGesture,
|
bool? hasGesture,
|
||||||
bool? isRedirect,
|
bool? isRedirect,
|
||||||
@Deprecated('Use navigationType instead')
|
@Deprecated('Use navigationType instead')
|
||||||
|
|
|
@ -32,29 +32,23 @@ class CreateWindowAction extends NavigationAction {
|
||||||
///The window id. Used by [WebView] to create a new WebView.
|
///The window id. Used by [WebView] to create a new WebView.
|
||||||
int windowId;
|
int windowId;
|
||||||
CreateWindowAction(
|
CreateWindowAction(
|
||||||
{@Deprecated('Use isDialog instead')
|
{@Deprecated('Use isDialog instead') this.androidIsDialog,
|
||||||
this.androidIsDialog,
|
@Deprecated('Use windowFeatures instead') this.iosWindowFeatures,
|
||||||
@Deprecated('Use windowFeatures instead')
|
|
||||||
this.iosWindowFeatures,
|
|
||||||
this.isDialog,
|
this.isDialog,
|
||||||
this.windowFeatures,
|
this.windowFeatures,
|
||||||
required this.windowId,
|
required this.windowId,
|
||||||
required URLRequest request,
|
required URLRequest request,
|
||||||
required bool isForMainFrame,
|
required bool isForMainFrame,
|
||||||
@Deprecated('Use hasGesture instead')
|
@Deprecated('Use hasGesture instead') bool? androidHasGesture,
|
||||||
bool? androidHasGesture,
|
|
||||||
bool? hasGesture,
|
bool? hasGesture,
|
||||||
@Deprecated('Use isRedirect instead')
|
@Deprecated('Use isRedirect instead') bool? androidIsRedirect,
|
||||||
bool? androidIsRedirect,
|
|
||||||
bool? isRedirect,
|
bool? isRedirect,
|
||||||
@Deprecated('Use navigationType instead')
|
@Deprecated('Use navigationType instead')
|
||||||
IOSWKNavigationType? iosWKNavigationType,
|
IOSWKNavigationType? iosWKNavigationType,
|
||||||
NavigationType? navigationType,
|
NavigationType? navigationType,
|
||||||
@Deprecated('Use sourceFrame instead')
|
@Deprecated('Use sourceFrame instead') IOSWKFrameInfo? iosSourceFrame,
|
||||||
IOSWKFrameInfo? iosSourceFrame,
|
|
||||||
FrameInfo? sourceFrame,
|
FrameInfo? sourceFrame,
|
||||||
@Deprecated('Use targetFrame instead')
|
@Deprecated('Use targetFrame instead') IOSWKFrameInfo? iosTargetFrame,
|
||||||
IOSWKFrameInfo? iosTargetFrame,
|
|
||||||
FrameInfo? targetFrame,
|
FrameInfo? targetFrame,
|
||||||
bool? shouldPerformDownload})
|
bool? shouldPerformDownload})
|
||||||
: super(
|
: super(
|
||||||
|
|
|
@ -134,13 +134,11 @@ class URLProtectionSpace_ {
|
||||||
@Deprecated("Use authenticationMethod instead")
|
@Deprecated("Use authenticationMethod instead")
|
||||||
this.iosAuthenticationMethod,
|
this.iosAuthenticationMethod,
|
||||||
this.authenticationMethod,
|
this.authenticationMethod,
|
||||||
@Deprecated("Use distinguishedNames instead")
|
@Deprecated("Use distinguishedNames instead") this.iosDistinguishedNames,
|
||||||
this.iosDistinguishedNames,
|
|
||||||
this.distinguishedNames,
|
this.distinguishedNames,
|
||||||
@Deprecated("Use receivesCredentialSecurely instead")
|
@Deprecated("Use receivesCredentialSecurely instead")
|
||||||
this.iosReceivesCredentialSecurely,
|
this.iosReceivesCredentialSecurely,
|
||||||
this.receivesCredentialSecurely,
|
this.receivesCredentialSecurely,
|
||||||
@Deprecated("Use proxyType instead")
|
@Deprecated("Use proxyType instead") this.iosProxyType,
|
||||||
this.iosProxyType,
|
|
||||||
this.proxyType});
|
this.proxyType});
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,10 +82,8 @@ class URLProtectionSpace {
|
||||||
required this.host,
|
required this.host,
|
||||||
@Deprecated('Use authenticationMethod instead')
|
@Deprecated('Use authenticationMethod instead')
|
||||||
this.iosAuthenticationMethod,
|
this.iosAuthenticationMethod,
|
||||||
@Deprecated('Use distinguishedNames instead')
|
@Deprecated('Use distinguishedNames instead') this.iosDistinguishedNames,
|
||||||
this.iosDistinguishedNames,
|
@Deprecated('Use proxyType instead') this.iosProxyType,
|
||||||
@Deprecated('Use proxyType instead')
|
|
||||||
this.iosProxyType,
|
|
||||||
@Deprecated('Use receivesCredentialSecurely instead')
|
@Deprecated('Use receivesCredentialSecurely instead')
|
||||||
this.iosReceivesCredentialSecurely,
|
this.iosReceivesCredentialSecurely,
|
||||||
this.port,
|
this.port,
|
||||||
|
|
|
@ -231,8 +231,7 @@ class URLRequest_ {
|
||||||
@Deprecated("Use allowsExpensiveNetworkAccess instead")
|
@Deprecated("Use allowsExpensiveNetworkAccess instead")
|
||||||
this.iosAllowsExpensiveNetworkAccess,
|
this.iosAllowsExpensiveNetworkAccess,
|
||||||
this.allowsExpensiveNetworkAccess,
|
this.allowsExpensiveNetworkAccess,
|
||||||
@Deprecated("Use cachePolicy instead")
|
@Deprecated("Use cachePolicy instead") this.iosCachePolicy,
|
||||||
this.iosCachePolicy,
|
|
||||||
this.cachePolicy,
|
this.cachePolicy,
|
||||||
@Deprecated("Use httpShouldHandleCookies instead")
|
@Deprecated("Use httpShouldHandleCookies instead")
|
||||||
this.iosHttpShouldHandleCookies,
|
this.iosHttpShouldHandleCookies,
|
||||||
|
@ -240,14 +239,11 @@ class URLRequest_ {
|
||||||
@Deprecated("Use httpShouldUsePipelining instead")
|
@Deprecated("Use httpShouldUsePipelining instead")
|
||||||
this.iosHttpShouldUsePipelining,
|
this.iosHttpShouldUsePipelining,
|
||||||
this.httpShouldUsePipelining,
|
this.httpShouldUsePipelining,
|
||||||
@Deprecated("Use networkServiceType instead")
|
@Deprecated("Use networkServiceType instead") this.iosNetworkServiceType,
|
||||||
this.iosNetworkServiceType,
|
|
||||||
this.networkServiceType,
|
this.networkServiceType,
|
||||||
@Deprecated("Use timeoutInterval instead")
|
@Deprecated("Use timeoutInterval instead") this.iosTimeoutInterval,
|
||||||
this.iosTimeoutInterval,
|
|
||||||
this.timeoutInterval,
|
this.timeoutInterval,
|
||||||
@Deprecated("Use mainDocumentURL instead")
|
@Deprecated("Use mainDocumentURL instead") this.iosMainDocumentURL,
|
||||||
this.iosMainDocumentURL,
|
|
||||||
this.mainDocumentURL,
|
this.mainDocumentURL,
|
||||||
this.assumesHTTP3Capable,
|
this.assumesHTTP3Capable,
|
||||||
this.attribution});
|
this.attribution});
|
||||||
|
|
|
@ -156,18 +156,14 @@ class URLRequest {
|
||||||
this.iosAllowsConstrainedNetworkAccess,
|
this.iosAllowsConstrainedNetworkAccess,
|
||||||
@Deprecated('Use allowsExpensiveNetworkAccess instead')
|
@Deprecated('Use allowsExpensiveNetworkAccess instead')
|
||||||
this.iosAllowsExpensiveNetworkAccess,
|
this.iosAllowsExpensiveNetworkAccess,
|
||||||
@Deprecated('Use cachePolicy instead')
|
@Deprecated('Use cachePolicy instead') this.iosCachePolicy,
|
||||||
this.iosCachePolicy,
|
|
||||||
@Deprecated('Use httpShouldHandleCookies instead')
|
@Deprecated('Use httpShouldHandleCookies instead')
|
||||||
this.iosHttpShouldHandleCookies,
|
this.iosHttpShouldHandleCookies,
|
||||||
@Deprecated('Use httpShouldUsePipelining instead')
|
@Deprecated('Use httpShouldUsePipelining instead')
|
||||||
this.iosHttpShouldUsePipelining,
|
this.iosHttpShouldUsePipelining,
|
||||||
@Deprecated('Use mainDocumentURL instead')
|
@Deprecated('Use mainDocumentURL instead') this.iosMainDocumentURL,
|
||||||
this.iosMainDocumentURL,
|
@Deprecated('Use networkServiceType instead') this.iosNetworkServiceType,
|
||||||
@Deprecated('Use networkServiceType instead')
|
@Deprecated('Use timeoutInterval instead') this.iosTimeoutInterval,
|
||||||
this.iosNetworkServiceType,
|
|
||||||
@Deprecated('Use timeoutInterval instead')
|
|
||||||
this.iosTimeoutInterval,
|
|
||||||
this.mainDocumentURL,
|
this.mainDocumentURL,
|
||||||
this.method,
|
this.method,
|
||||||
this.networkServiceType,
|
this.networkServiceType,
|
||||||
|
|
|
@ -612,15 +612,18 @@ extension InternalChannelController on ChannelController {
|
||||||
return this._channel;
|
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;
|
Future<dynamic> Function(MethodCall call)? get handler => _handler;
|
||||||
|
|
||||||
bool get disposed => _channel == null;
|
bool get disposed => _channel == null;
|
||||||
|
|
||||||
initMethodCallHandler() {
|
initMethodCallHandler() {
|
||||||
assert(channel != null, 'Method Channel for ${runtimeType} not initialized!');
|
assert(
|
||||||
assert(handler != null, 'Method Call Handler for ${runtimeType} not initialized!');
|
channel != null, 'Method Channel for ${runtimeType} not initialized!');
|
||||||
|
assert(handler != null,
|
||||||
|
'Method Call Handler for ${runtimeType} not initialized!');
|
||||||
|
|
||||||
channel?.setMethodCallHandler((call) async {
|
channel?.setMethodCallHandler((call) async {
|
||||||
if (disposed) return null;
|
if (disposed) return null;
|
||||||
|
|
|
@ -186,6 +186,7 @@ class WebAuthenticationSession extends ChannelController {
|
||||||
///- iOS
|
///- iOS
|
||||||
static Future<bool> isAvailable() async {
|
static Future<bool> isAvailable() async {
|
||||||
Map<String, dynamic> args = <String, dynamic>{};
|
Map<String, dynamic> args = <String, dynamic>{};
|
||||||
return await _sharedChannel.invokeMethod<bool>("isAvailable", args) ?? false;
|
return await _sharedChannel.invokeMethod<bool>("isAvailable", args) ??
|
||||||
|
false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue