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 {
EMError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.isConnected);
} on EMError catch (e) {
throw e;
}
}