registerOnConnectFinished static method
void
registerOnConnectFinished(
- void callback(
- GemError connection,
- NetworkType networkType,
- ProxyDetails? httpsProxyInfo,
- ProxyDetails? httpProxyInfo,
Register a callback to be invoked when the connection is finished.
Only Android supports this feature.
Parameters
- IN connection The connection information.
- IN networkType The type of network.
- IN httpsProxyInfo The HTTPS proxy information.
- IN httpProxyInfo The HTTP proxy information.
Throws
- PlatformException if the platform is not Android.
Implementation
static void registerOnConnectFinished(
void Function(
GemError connection,
NetworkType networkType,
ProxyDetails? httpsProxyInfo,
ProxyDetails? httpProxyInfo,
)
callback,
) {
if (!Platform.isAndroid) {
throw PlatformException(
code: 'PlatformNotSupported',
message: 'The platform is not Android.',
);
}
_onConnectFinished = callback;
}