FdcCellContext class
Runtime cell context passed to FdcCustomColumn.cellBuilder.
This context contains visual/layout/interaction state for the grid cell. Keep value access and writes on FdcFieldContext; keep styling, alignment, selection, editability and Flutter cell context here.
Constructors
- FdcCellContext({required BuildContext buildContext, required int rowIndex, required int columnIndex, required bool selected, required bool editing, required bool canEdit, required bool readOnly, required Alignment alignment, required TextAlign textAlign, required FdcCellValueFormatter valueFormatter, Color? backgroundColor, TextStyle? textStyle, void onControlPointerDown(Offset globalPosition)?})
-
Creates a FdcCellContext.
const
Properties
- alignment → Alignment
-
Resolved alignment used by built-in display cells.
final
- backgroundColor → Color?
-
Resolved cell background color, including read-only/disabled/selected
state when the active grid style defines one.
final
- buildContext → BuildContext
-
Flutter build context for the cell.
final
- canEdit → bool
-
Whether the grid/dataset currently allow editing this cell.
final
- columnIndex → int
-
Visual column index in the current grid view.
final
- editing → bool
-
Whether this cell is currently in the grid editing state.
final
- foregroundColor → Color?
-
Convenience accessor for
textStyle.color.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- onControlPointerDown → void Function(Offset globalPosition)?
-
Internal hook used by custom in-cell mouse controls to preserve the grid
viewport while activating/writing the owning cell.
final
- readOnly → bool
-
Whether this cell should be treated as read-only by custom UI.
final
- rowIndex → int
-
Visual row index in the current grid view.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → bool
-
Whether this cell is selected in the grid.
final
- textAlign → TextAlign
-
Resolved text alignment used by built-in display cells.
final
- textStyle → TextStyle?
-
Resolved text style for the cell, including grid-level and column-level
text style overrides.
final
Methods
-
control(
Widget child, {bool enabled = true}) → Widget - Wraps a custom in-cell control so mouse/touch interaction keeps the grid viewport stable while FdcFieldContext.setValue or FdcFieldContext.setValueOf writes through the grid pipeline.
-
formatValue(
FdcGridColumn column, Object? value, {FdcColumnIdentity? runtimeColumnId}) → String -
Formats
valueexactly as the grid would format it forcolumn. -
handleControlPointerDown(
PointerDownEvent event) → void - Marks a pointer-down event as belonging to an interactive control inside the custom cell.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited