IntrinsicDimension class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- IntrinsicDimension
Constructors
- IntrinsicDimension({Key? key, void listener(BuildContext context, double width, double height, Offset startOffset)?, required Widget builder(BuildContext context, double width, double height, Offset startOffset), bool rebuild = false})
-
IntrinsicDimension exposes a listener and a builder to get
the dimensions of the widget returned from the builder.
const
Properties
- builder → Widget Function(BuildContext context, double width, double height, Offset startOffset)
-
The builder callback function which is invoked on each widget build.
The builder takes the
BuildContext
, thewidth
, theheight
, and thestartOffset
from where the widget is drawn. The builder must return a widget. This is the widget from where is retrieved the width, height, and offset.final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- listener → (void Function(BuildContext context, double width, double height, Offset startOffset)?)
-
The listener callback function which is invoked on each widget build.
The listener takes the
BuildContext
, thewidth
, theheight
, and thestartOffset
from where the widget is drawn. The listener returns nothing and it can be used to executes actions. For example, calling the setState method of an stateful widget and update the whole widget based on this widget dimensions.final - rebuild → bool
-
The rebuild boolean allows to rebuild the widget every frame
when it is set to true which updates the width, height, and
offset offered by the listener and builder callback functions.
This could be useful when changing the font size from the OS
settings. If rebuild is false, changing the font size could
change the widget size and offset and those properties won't
be given again by this widget via listener or builder
callback functions.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< IntrinsicDimension> -
Creates the mutable state for this widget at a given location in the tree.
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.
inherited
-
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