ghosttyTerminalSelectionContentFor<SelectionT> function

GhosttyTerminalSelectionContent<SelectionT>? ghosttyTerminalSelectionContentFor<SelectionT>(
  1. SelectionT? selection, {
  2. required String resolveText(
    1. SelectionT selection
    ),
})

Builds shared selection callback payloads from terminal text extraction.

Implementation

GhosttyTerminalSelectionContent<SelectionT>?
ghosttyTerminalSelectionContentFor<SelectionT>(
  SelectionT? selection, {
  required String Function(SelectionT selection) resolveText,
}) {
  if (selection == null) {
    return null;
  }
  return GhosttyTerminalSelectionContent<SelectionT>(
    selection: selection,
    text: resolveText(selection),
  );
}