Flexible
A widget that takes up to a flex share of the available main-axis
space in a Flex. With FlexFit.loose the child can take less than
its allocation; with FlexFit.tight it must take exactly that much.
See also: Expanded to make the child fill its share · Spacer for an empty gap.
Learn more: Layout
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
Row(children: [ Flexible(child: Text(longLabel)), Text('ready'),])Constructors
Section titled “Constructors”Flexible()
Section titled “Flexible()”| Parameter | Type | Default | Description |
|---|---|---|---|
flex: | int | 1 | Share of remaining main-axis space relative to sibling flex children. |
fit: | FlexFit | FlexFit.loose | Whether the child must fill its allocation or may use less of it. |
child: | Widget | required | Content laid out within this widget’s flex allocation. |
Source
Section titled “Source”Flexible is defined in packages/fleury/lib/src/widgets/basic.dart.
Category: Layout · All widgets