hold method
Puts the call on/off hold.
enable
- True if the call should be put on hold, false for unhold
Throws VIException, if an error occurred.
Errors:
- VICallError.ERROR_REJECTED - If the operation is rejected.
- VICallError.ERROR_ALREADY_IN_THIS_STATE - If the call is already in the requested state.
- VICallError.ERROR_INCORRECT_OPERATION - If the call is not connected.
- VICallError.ERROR_INTERNAL - If an internal error occurred.
- VICallError.ERROR_TIMEOUT - If the operation is not completed in time.
- VICallError.ERROR_RECONNECTING - If the call is currently reconnecting.
Implementation
Future<void> hold(bool enable) async {
try {
await _channel.invokeMethod<void>('Call.holdCall',
<String, dynamic>{'callId': _callId, 'enable': enable});
} on PlatformException catch (e) {
throw VIException(e.code, e.message);
}
}