Tabs
Tabs
MUITabs
The MUITabs
widget is a flexible and customizable tab bar for Flutter applications, designed to enhance navigation and content organization. It supports both horizontal and vertical orientations and provides options for customization such as underlining and transparency.
Parameters:
tabs
: List ofMUITab
objects, where each tab has a label and an optional icon.tabIndex
: Index of the initially selected tab. Default is 0.backgroundColor
: Background color of the tab bar. Default is a light grayish color.curve
: The curve for the animation when switching tabs. Default isCurves.easeInOut
.onChanged
: Callback function that is called when a tab is tapped. It provides the index of the selected tab.indicatorColor
: Color of the tab indicator.indicatorBorderRadius
: Border radius of the tab indicator.maxTabSize
: Maximum size for an individual tab. The final tab size is calculated based on the available space.borderRadius
: Border radius of the container that wraps around the tab bar.labelStyle
: Style for the tab labels.axis
: The axis in which the tab bar should be oriented (horizontal or vertical).animationDuration
: Duration of the animation when switching tabs.underline
: Whether to use an underline for indicating the selected tab.underlineHeight
: Height of the underline ifunderline
is set totrue
.
Factory Constructors
MUITabs.transparent
MUITabs.transparent
Creates a transparent tab bar.
MUITabs.underlined
MUITabs.underlined
Creates a tab bar with an underline for the selected tab.
Example usage
Default
Transparent
Underlined
Vertical
Last updated