CANNOT_CONNECT_TO_HOST property
Failed to connect to the server.
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebViewClient.ERROR_CONNECT)
- iOS (Official API - URLError.cannotConnectToHost)
- MacOS (Official API - URLError.cannotConnectToHost)
Implementation
static final CANNOT_CONNECT_TO_HOST =
WebResourceErrorType._internalMultiPlatform('CANNOT_CONNECT_TO_HOST', () {
switch (defaultTargetPlatform) {
case TargetPlatform.android:
return -6;
case TargetPlatform.iOS:
return -1004;
case TargetPlatform.macOS:
return -1004;
default:
break;
}
return null;
});