FxGrid class

A responsive grid layout widget that arranges its children in a row.

This widget is used to create a responsive grid layout where children are laid out horizontally. The number of columns in the grid is determined based on the screen width and the provided breakpoints. The grid supports hiding or showing specific columns using the hideOn and showOn properties.

Inheritance
Available Extensions

Constructors

FxGrid({required List<FxGridColumn> children, Key? key, List<int> breakpoints = const <int>[576, 768, 992, 1200], List<int> hideOn = const <int>[], List<int> showOn = const <int>[], MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start})
Constructs an FxGrid widget.
const

Properties

breakpoints List<int>
The list of screen widths at which the number of columns in the grid changes.
final
children List<FxGridColumn>
The list of FxGridColumn widgets that represent the columns in the grid.
final
crossAxisAlignment CrossAxisAlignment
How the columns are aligned vertically.
final
hashCode int
The hash code for this object.
no setterinherited
hideOn List<int>
The list of column indices to hide.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mainAxisAlignment MainAxisAlignment
How the columns are aligned horizontally.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showOn List<int>
The list of column indices to show, regardless of other conditions.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
calculateColumns(int totalColumns, List<FxGridColumn> visibleChildren) List<FxGridColumn>
Calculates the columns to be rendered in the grid based on the total number of columns and the visible children.
calculateTotalColumns(double screenWidth) int
Calculates the total number of columns in the grid based on the screen width.
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
filterVisibleChildren() List<FxGridColumn>
Filters the visible children based on the showOn and hideOn parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

defaultGutter → const double
The default gutter value used in the layout.