LayoutGrid class
Lays out its children using a approximation of the CSS Grid Layout algorithm, as described here:
https://drafts.csswg.org/css-grid/
If a grid item falls outside of the area defined by the template tracks, an FlutterError will be thrown during layout.
- Inheritance
- Available extensions
Constructors
-
LayoutGrid({Key? key, AutoPlacement autoPlacement = AutoPlacement.rowSparse, GridFit gridFit = GridFit.expand, String? areas, required List<
TrackSize> columnSizes, required List<TrackSize> rowSizes, double? rowGap, double? columnGap, TextDirection? textDirection, List<Widget> children = const []})
Properties
- areas → String?
-
Defines named areas of the grid for placement of grid items by name.
final
- autoPlacement → AutoPlacement
-
Controls how the auto-placement algorithm works, specifying exactly how
auto-placed items get flowed into the grid.
final
-
children
→ List<
Widget> -
The widgets below this widget in the tree.
finalinherited
- columnGap → double
-
Space between column tracks
final
-
columnSizes
→ List<
TrackSize> -
Defines the track sizing functions of the grid's columns.
final
- gridFit → GridFit
-
Determines the constraints available to the grid layout algorithm.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- rowGap → double
-
Space between row tracks
final
-
rowSizes
→ List<
TrackSize> -
Defines the track sizing functions of the grid's rows.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textDirection → TextDirection?
-
The text direction used to resolve column ordering.
final
Methods
-
createElement(
) → MultiChildRenderObjectElement -
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
-
createRenderObject(
BuildContext context) → RenderLayoutGrid -
Creates an instance of the RenderObject class that this
RenderObjectWidget represents, using the configuration described by this
RenderObjectWidget.
override
-
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.
override
-
didUnmountRenderObject(
covariant RenderObject renderObject) → void -
This method is called when a RenderObject that was previously
associated with this widget is removed from the render tree.
The provided RenderObject will be of the same type as the one created by
this widget's createRenderObject method.
inherited
-
inGridArea(
String areaName, {Key? key}) → NamedAreaGridPlacement -
Available on Widget, provided by the GridPlacementExtensions extension
-
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, int wrapWidth = 65}) → 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
-
updateRenderObject(
BuildContext context, covariant RenderLayoutGrid renderObject) → void -
Copies the configuration described by this RenderObjectWidget to the
given RenderObject, which will be of the same type as returned by this
object's createRenderObject.
override
-
withGridPlacement(
{Key? key, int? columnStart, int columnSpan = 1, int? rowStart, int rowSpan = 1}) → GridPlacement -
Available on Widget, provided by the GridPlacementExtensions extension
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited