data_grid/data_grid library

Classes

AxisBoundedSelection
Describes a SelectionWithEdges in which is completely bounded in one Axis and partially or no bounded in the other axis (called here cross-axis).
BoundedSelection
Describes a SelectionWithEdges in which is completely bounded in all sides. All side values are guaranteed to be non-null.
CellDelegate<CellDataType>
CellLayout
CellOperation<CellDataType extends SwayzeCellData>
A definition of a mutative operation on the state of cells to be performed on matrix
CellPositionResult
A result of a conversion of a cell's coordinates into it's offset and size
CellsModifier<CellDataType extends SwayzeCellData>
A interface to map changes in the cell state ina specific state update.
CellUserSelectionModel
A UserSelectionModel that represents a Range2D of cells.
ControllerBase
A base class for all controllers and sub controllers on swayze.
DataController
A controller that manages state related to data, usually provided externally to SwayzeController.
DeleteCellOperation<CellDataType extends SwayzeCellData>
A description of a CellOperation that removes a cell located on position.
ExpandAll
A widget that forces all children to render at maximum size possible given the current BoxConstraints
ExpandSelectionByBlockIntent
A SwayzeIntent to expand the current Selection in the given AxisDirection by a block of cells.
ExpandSelectionIntent
A SwayzeIntent to expand the the current Selection in the given AxisDirection.
HeaderSelectionStartIntent
A SwayzeIntent to start a selection in the table headers.
HeaderSelectionUpdateIntent
A SwayzeIntent to update a selection in the headers.
HeaderUserSelectionModel
A UserSelectionModel that covers entire columns or rows.
InMemoryTable
IntVector2
A 2D vector of ints
MatrixMap<T>
A data structure that organizes items of T in a 2d map with int keys.
MatrixMapIterableResult<T>
Holds the value and position of an item in a MatrixMapReadOnly.
MatrixMapReadOnly<T>
A read only interface for instances of MatrixMap
MoveActiveCellByBlockIntent
A SwayzeIntent to move the ActiveCell in the given AxisDirection by a block of cells.
MoveActiveCellIntent
A SwayzeIntent to move the ActiveCell in the given AxisDirection
OpenInlineEditorIntent
A SwayzeIntent triggered when a checkbox cell is tapped.
PixelResult
A result of a conversion of a column/row index into a pixel offset.
PositionResult
A result of a conversion of a pixel offset into column/row index.
PutCellOperation<CellDataType extends SwayzeCellData>
A description of a CellOperation that updates or inserts cellData into the cell matrix.
Range
Defines a continuous range of integers from start to end.
Range2D
Defines an underlying rectangle in an int universe. Each dimension can be defined by a Range
RangeCompactList
A list of ranges that keeps with the smallest possible size (no overlaps between its members)
RangeIterable
RangeIterator
An int Iterator that allows getting elements of a Range one at a time.
Selection
The most simple description of a portion of the grid that is supposed to be selected or to receive a special decoration (defined by style).
SelectionBorderSide
Describes how each side of a Selection border should be rendered.
SelectionStyle
A decoration used in the widget tree to render a visual representation of a Selection.
SelectionWithEdges<EdgeType>
Describes a Selection that is bounded at least in one dimension. As a consequence it should have an anchor and a focus that should influence the computation of anchorCoordinate and focusCoordinate
SelectTableIntent
A SwayzeIntent to select the whole table
SliverSwayzeTable<CellDataType extends SwayzeCellData>
A sliver StatefulWidget that represents one single table on a scroll view.
SubController<ParentType extends SwayzeController>
A controller to be created by SwayzeController and have access to it via parent.
SwayzeAutoFitMeasurementRequest
SwayzeCellData
A immutable data structure that holds data of a particular cell. It only holds the relevant data to cell rendering on swayze.
SwayzeCellsController<CellDataType extends SwayzeCellData>
A ChangeNotifier that is in charge of managing the state of all cells in a table and to communicate state changes to its listeners.
SwayzeController
The main controller on swayze.
SwayzeHeaderController
A ValueListenable that keeps the state of columns or rows in a table.
SwayzeHeaderData
SwayzeHeaderPalette
Describes a collection of colors for headers in a determinate state.
SwayzeHeaderState
The value of SwayzeHeaderController.
SwayzeIntent
Defines a Intent that is emitted within swayze rules.
SwayzeScrollController<ParentType extends SwayzeController>
A SubController that manages scroll of a single table.
SwayzeSelectionController
A ControllerBase that keeps track of the active selections in the table.
SwayzeStyle
Describes a set of interface options used by elements inside a table.
SwayzeTableDataController<ParentType extends SwayzeController>
A ControllerBase that manages some data on table.
SwayzeTableStatus
SwayzeTableView
TableBodySelectionStartIntent
A SwayzeIntent to start a selection in the table body.
TableBodySelectionUpdateIntent
A SwayzeIntent to update a selection in the table body.
TableUserSelectionModel
A completely unbounded UserSelectionModel. It selects the entire table.
UserSelectionModel
Defines a Selection that is controllable by a UserSelectionState.
UserSelectionState
A immutable description of the disposition of UserSelectionModels in a given moment.
ViewportAxisContext
A ChangeNotifier that manages has ViewportAxisContextState as subject.
ViewportAxisContextState
A immutable value that is the subject of ViewportAxisContext.
ViewportContext
Interface that provides information about the visible rows and columns: Their sizes, which space in the viewport each one occupies and their respective offset.

Enums

Corner
The four corners in a rectangular shape.
OffscreenDetails
Used by PixelResult and PositionResult to describe if the result is off the viewport.
RangeEdge
The edge of a one dimensional shape.

Extensions

CornerMethods on Corner
Add methods to each Corner option.
OverflowViewportMethods on OffscreenDetails
RangeEdgeMethods on RangeEdge
Add methods to each RangeEdge option.
SelectionMethods on Selection
Non overridable Selection methods.

Constants

kColumnHeaderHeight → const double
The height of the column headers.
kDefaultCellHeight → const double
kDefaultCellWidth → const double
kDefaultDashIntervals → const List<double>
kDefaultScrollAnimationCurve → const Cubic
kDefaultScrollAnimationDuration → const Duration
kMinimumResizableColumnExtent → const double
kMinimumResizableRowExtent → const double
kRowHeaderWidth → const double
The starting width of row headers.

Functions

computeHeaderAutoFitExtent<CellDataType extends SwayzeCellData>({required BuildContext context, required Axis axis, required int headerPosition, required SwayzeTableDataController<SwayzeController> tableDataController, required CellDelegate<CellDataType> cellDelegate, required MatrixMapReadOnly<CellDataType> cellMatrix, required SwayzeStyle style, required String headerLabel}) Future<double?>
computeHeaderAutoFitExtents<CellDataType extends SwayzeCellData>({required BuildContext context, required Axis axis, required Iterable<int> headerPositions, required SwayzeTableDataController<SwayzeController> tableDataController, required CellDelegate<CellDataType> cellDelegate, required MatrixMapReadOnly<CellDataType> cellMatrix, required SwayzeStyle style, required String headerLabelFor(int headerPosition)}) Future<Map<int, double>>
createColorFromHEX(String hexString) Color
Return a Color from a Hex string.
createHeaderAutoFitMeasurementRequest({required String label, required SwayzeStyle style}) SwayzeAutoFitMeasurementRequest
createHexStringFromColor(Color color) String
Returns a string HEX color prefixed with "#".
generateLabelForCoordinate(IntVector2 coordinate) String
Generates a label that represents a coordinate composed by the results of generateLabelForIndex for each axis concatenated.
generateLabelForIndex(Axis axis, int index) String
Generates a header label given an axis and a header index.
headerWidthForRange(Range range) double
Get the width of the rows headers given the actual range, this adjusts the size of the header to show larger numbers.
maxAutoFitExtentForAxis(SwayzeStyle style, Axis axis) double?
measureAutoFitLayouts(BuildContext context, List<SwayzeAutoFitMeasurementRequest> requests) Future<List<Size>>
minimumResizableExtentForAxis(Axis axis) double

Typedefs

InlineEditorBuilder = Widget Function(BuildContext context, IntVector2 coordinate, VoidCallback requestClose, {String? initialText, required bool overlapCell, required bool overlapTable})
Type signature of functions that builds the widget that allows the editing of an individual cell in the same physical position as the once occupied by the cell in the table.
MatrixMapIterator<T> = void Function(T item, int colIndex, int rowIndex)
A function signature to iterate on a MatrixMap of type T
MaybeMatrixMapIterator<T> = void Function(T? item, int colIndex, int rowIndex)
A function signature to iterate on a MatrixMap of type T
SwayzeCellsControllerCellParser<CellDataType extends SwayzeCellData> = CellDataType Function(dynamic rawCell)
A signature of callbacks responsible to convert a cell from a raw type to CellDataType
WrapBoxBuilder = Widget Function(BuildContext context, Widget child)
A builder that builds a widget that wraps the box parts of a SliverSwayzeTable.
WrapHeaderBuilder = Widget Function(BuildContext context, ViewportContext viewportContext, Axis axis, Widget child)
A builder that builds a widget that wraps the headers of SliverSwayzeTable.
WrapTableBodyBuilder = Widget Function(BuildContext context, ViewportContext viewportContext, Widget child)
A builder that builds a widget that wraps the main area of SliverSwayzeTable.