LayoutBuilder class

Builds its child widget tree based on the parent's BoxConstraints.

The builder callback receives the current constraints and returns a widget. Useful for widgets that need to know their available size before choosing how to render.

Inheritance

Constructors

LayoutBuilder({Key? key, required LayoutWidgetBuilder builder})
Creates a LayoutBuilder with the given builder callback.
const

Properties

builder LayoutWidgetBuilder
Called at layout time with the current BoxConstraints.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates the Element for this widget.
inherited
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