isConnected method Null safety

Future<bool> isConnected()

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;
  }
}