getCallState static method
Get the current call state
Other platforms than Android and iOS will receive CallState.UNKNOWN
Implementation
static Future<String> getCallState({
required String? sessionId,
}) async {
if (!Platform.isAndroid && !Platform.isIOS)
return Future.value(CallState.UNKNOWN);
return _methodChannel.invokeMethod("getCallState", {
'session_id': sessionId,
}).then((state) {
return state.toString();
});
}