handleSelection method

void handleSelection([
  1. String? componentId,
  2. String keyCode = 'ENTER'
])

Implementation

void handleSelection([String? componentId, String keyCode = 'ENTER']) {
  var targetId = componentId ?? _currentFocusNodeId;
  if (targetId == null) {
    moveFocus('NONE');
    targetId = _currentFocusNodeId;
  }
  if (targetId != null && targetId.isNotEmpty) {
    setFocus(targetId);
    scheduler.triggerSelection(targetId, keyCode);
    onStateChanged?.call();
  }
}