FdcGridRangeSelectionSession class abstract
Mutable runtime state contract for range selection attached to one grid instance.
The Community grid host creates, calls, and owns the lifetime of one session per attached FdcGridRangeSelectionFeature. Extension packages implement this class to hold anchor/extent state, keyboard and pointer gesture state, clipboard planning, context-menu contribution, and overlay construction. All row indexes are zero-based data-row indexes; column indexes are source indexes unless a parameter explicitly says visual order.
The Community package owns only the neutral grid/runtime seam. First-party and
compatible third-party extension packages may implement this stable
fdc_ext.dart contract. Implementations should treat host references and runtime
callbacks as attachment-scoped and release transient input state when detached or
reset by the host.
Constructors
- FdcGridRangeSelectionSession()
-
Creates a FdcGridRangeSelectionSession.
const
- FdcGridRangeSelectionSession.noop()
-
Creates a disabled no-op session used when no range-selection extension
is attached to the Community grid host.
factory
Properties
- anchorCell ↔ FdcGridCellRef?
-
Anchor owned by this session for the retained range, or
nullwhen no range gesture has established one.getter/setter pair - extentCell ↔ FdcGridCellRef?
-
Extent owned by this session for the retained range, or
nullwhen no range gesture has established one.getter/setter pair - hasExplicitCellRange → bool
-
Whether anchor and extent currently describe an explicit multi-cell gesture range.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasInputState → bool
-
Whether transient keyboard or pointer gesture state is currently active.
no setter
- hasRangeState → bool
-
Whether any selected-range state is currently retained by the session.
no setter
- modifierActive → bool
-
Whether the effective range-extension modifier is currently active.
no setter
- modifierDown ↔ bool
-
True while the session is tracking the range-selection modifier gesture.
getter/setter pair
- pointerDragActive ↔ bool
-
True while this session owns an active pointer-drag range gesture.
getter/setter pair
- pointerHoverCell ↔ FdcGridCellRef?
-
Last pointer-hovered cell tracked by this session, or
nullwhen no hover target is retained.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollOffsetLockActive ↔ bool
-
True while this session has locked range projection to a captured scroll
offset during an input gesture.
getter/setter pair
Methods
-
beginModifierRange(
FdcGridCellRef? current) → bool -
Starts a modifier-key range from
current, returning whether state changed. -
beginOrExtendFromSelectedCell(
{required FdcGridCellRef previousCell, required FdcGridCellRef currentCell}) → bool - Starts or extends a range after grid cell navigation changed the selected cell.
-
buildContextMenuEntries(
BuildContext context, ) → List< FdcMenuEntry> - Builds context-menu entries for the current range-selection state.
-
buildOverlay(
BuildContext context, FdcGridRangeSelectionOverlayContext overlayContext) → Widget - Builds the visual overlay for the selected range.
-
clearRange(
) → void - Clears the selected range while preserving unrelated host state.
-
containsCell(
FdcGridRangeSelectionBounds? bounds, FdcGridCellRef? cell) → bool -
Whether
celllies insidebounds. -
copySelectionToClipboard(
{required FdcGridRangeSelectionBounds bounds, required int rowCount, required int columnCount, required FdcGridRangeSelectionCellTextReader readCellText}) → Future< void> -
Serializes
boundsas tabular text and writes it to the system clipboard. -
dismissRange(
) → bool - Dismisses current range state and returns whether anything changed.
-
endModifierRange(
) → bool - Ends the current modifier-key range gesture.
-
endPointerDrag(
) → bool - Finishes the active pointer range gesture.
-
isModifierKeyEvent(
KeyEvent event) → bool -
Whether
eventtargets the modifier key used to extend a range. -
isModifierPressedEvent(
KeyEvent event) → bool -
Whether
eventrepresents the range modifier entering a pressed state. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readClipboardPastePlan(
{required FdcGridRangeSelectionBounds bounds, required int rowCount, required int columnCount, required bool fillSingleValue, required FdcGridRangeSelectionCellEditablePredicate isCellEditable, required FdcGridRangeSelectionCellTextParser parseCellText}) → Future< FdcGridRangeSelectionPastePlan?> -
Reads tabular clipboard text and builds a validated paste plan for
bounds. -
releaseInput(
) → void - Releases transient keyboard and pointer input state without discarding the range.
-
reset(
) → void - Resets the current state.
-
resolveBounds(
{required bool enabled, required FdcGridCellRef? selectedCell, required List< int> visualColumnIndexes}) → FdcGridRangeSelectionBounds? - Resolves the current rectangular range against the active visual column order.
-
shouldHandleCopyShortcut(
{required bool enabled, required bool copyEnabled, required bool hasActiveCellEditor, required bool gridCellHasPrimaryFocus}) → bool - Whether the current grid focus and editor state allow range-copy handling.
-
shouldHandleEscape(
{required bool enabled}) → bool - Whether Escape should dismiss current range-selection state.
-
shouldHandlePasteShortcut(
{required bool enabled, required bool pasteEnabled, required bool hasActiveCellEditor, required bool gridCellHasPrimaryFocus}) → bool - Whether the current grid focus and editor state allow range-paste handling.
-
shouldProcessGlobalModifierEvent(
{required bool enabled, required bool modifierKey, required bool pressed, required FdcGridCellRef? hoverCell, required bool hasActiveCellEditor, required bool hasGridTextInputFocus}) → bool - Whether a global modifier transition should update range-selection input state.
-
startPointerDrag(
{required bool enabled, required bool modifierActive, required FdcGridCellRef target, required FdcGridCellRef? selectedCell}) → bool -
Starts pointer-driven range extension at
target. -
toString(
) → String -
A string representation of this object.
inherited
-
updateModifierFromKeyboard(
{required bool enabled, required bool pressed, required FdcGridCellRef? currentCell}) → bool - Updates modifier-driven range state from keyboard input.
-
updatePointerDrag(
FdcGridCellRef target) → bool -
Extends an active pointer drag to
target, returning whether state changed. -
updatePointerHoverCell(
FdcGridCellRef? next) → bool - Updates the cell currently under the pointer and returns whether state changed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited