CNTabRail class

A vertical tab bar for the side of the screen.

On iPhone Duo the system moves tab bars to a vertical bar on one edge — on the outer display, and in landscape on the inner display — but only the tab bars of system containers. CNTabBar is a standalone bar, so it stays horizontal; this widget is its vertical counterpart and takes the same CNTabBarItems. CNTabScaffold switches between the two automatically.

Native Liquid Glass on iOS 26 and later; a Cupertino-drawn fallback elsewhere.

Inheritance
Available extensions

Constructors

CNTabRail({Key? key, required List<CNTabBarItem> items, required int currentIndex, required ValueChanged<int> onTap, CNTabRailStyle style = CNTabRailStyle.rail, Color? tint})
Creates a vertical tab rail.
const

Properties

currentIndex → int
The selected tab.
final
hashCode → int
The hash code for this object.
no setterinherited
items → List<CNTabBarItem>
The tabs. SF Symbols (icon / activeIcon), custom icons and badges are supported; image assets are not.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → ValueChanged<int>
Called with the index of a tapped tab, including the selected one.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → CNTabRailStyle
Rail or sidebar.
final
tint → Color?
Colour of the selected tab. Defaults to the theme's primary colour.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<CNTabRail>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
liquidGlass({CNGlassEffect effect = CNGlassEffect.regular, CNGlassEffectShape shape = CNGlassEffectShape.capsule, double? cornerRadius, Color? tint, bool interactive = false}) → Widget

Available on Widget, provided by the LiquidGlassExtension extension

Applies a Liquid Glass effect to this widget.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

railHeight(int count) → double
Height of the CNTabRailStyle.rail style with count items.

Constants

railWidth → const double
Width of the CNTabRailStyle.rail style.
sidebarWidth → const double
Width of the CNTabRailStyle.sidebar style.