callState property

Future<CallState> callState

Returns a constant that represents the current state of all phone calls.

Returns:

Future<CallState>

Implementation

Future<CallState> get callState async {
  final int? state =
      await _foregroundChannel.invokeMethod<int>(GET_CALL_STATE);
  if (state != null) {
    return CallState.values[state];
  } else {
    return CallState.UNKNOWN;
  }
}