Skip to content

Expanded

A widget that takes a flex share of the available main-axis space in a Flex. Always uses FlexFit.tight — the child is forced to take exactly its allocation.

See also: Flexible to let the child take less than 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: [
const SizedBox(width: 18, child: Sidebar()),
const Expanded(child: Editor()),
],
)
ParameterTypeDefaultDescription
flex:int1Share of remaining main-axis space relative to sibling flex children.
child:WidgetrequiredContent laid out within this widget’s flex allocation.

Expanded is defined in packages/fleury/lib/src/widgets/basic.dart.

Category: Layout · All widgets