toggleHold method

void toggleHold()

Implementation

void toggleHold() {
  final activeCall = call?.call;
  if (activeCall == null) return;
  if (activeCall.session.isOnHold()['local']) {
    activeCall.unhold();
  } else {
    activeCall.hold();
  }
}