Skip to main content

FractionallySizedBox

Overview

Set a child's size as a fraction of its parent's size. For example, you can build an input field that takes up only 80% of the screen width.

Properties

PropertyDescriptionValueDefault
alignmentSets the reference position used to align the proportionally sized child widget inside the available area.Alignment valueCenter (X: 0, Y: 0)
widthFactorMultiplies the available width by this factor and uses the result as the child widget's width.Factor of 0.0 or greaterNot set
heightFactorMultiplies the available height by this factor and uses the result as the child widget's height.Factor of 0.0 or greaterNot set