isConnected method Null safety
Checks whether the SDK is connected to the chat server.
Return the result whether the SDK is connected to the chat server.
true: means that the SDK is connected to the chat server.
false: means not.
Implementation
Future<bool> isConnected() async {
Map result = await _channel.invokeMethod(ChatMethodKeys.isConnected);
try {
ChatError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.isConnected);
} on ChatError catch (e) {
throw e;
}
}