Spacer
A flexible empty gap along the main axis of a Row or Column.
See also: Expanded to give the space to a child · Flexible for a child that may take less.
Learn more: Layout
Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.
Row(children: [ Text('left'), const Spacer(), Text('right'),])Details
Section titled “Details”A Spacer() between two children pushes them to opposite ends;
Spacer(flex: 2) takes twice the share of another Spacer. It is
shorthand for Expanded(flex: flex, child: const SizedBox.shrink()).
Constructors
Section titled “Constructors”Spacer()
Section titled “Spacer()”| Parameter | Type | Default | Description |
|---|---|---|---|
flex: | int | 1 | This spacer’s share of the remaining main-axis space, relative to other flex children. |
Source
Section titled “Source”Spacer is defined in packages/fleury/lib/src/widgets/basic.dart.
Category: Layout · All widgets