Skip to content

IndexedStack

Shows the child at index and keeps the rest mounted but unpainted, so their state survives switching between them — the basis for tabbed or paged surfaces that must remember each page. Sized to the largest child; an out-of-range index shows nothing.

See also: Tabs for a tab strip that switches pages.

Learn more: Layout

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

IndexedStack(
index: selectedTab,
children: const [InboxView(), SettingsView()],
)
ParameterTypeDefaultDescription
index:int0Which child to paint. Out-of-range paints nothing.
children:List<Widget>const []The widgets below this widget in the tree, in layout and paint order.

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

Category: Layout · All widgets