tabBar property

CupertinoTabBar tabBar

The tabBar is a CupertinoTabBar drawn at the bottom of the screen that lets the user switch between different tabs in the main content area when present.

The CupertinoTabBar.currentIndex is only used to initialize a CupertinoTabController when no controller is provided. Subsequently providing a different CupertinoTabBar.currentIndex does not affect the scaffold or the tab bar's active tab index. To programmatically change the active tab index, use a CupertinoTabController.

If CupertinoTabBar.onTap is provided, it will still be called. CupertinoTabScaffold automatically also listen to the CupertinoTabBar's onTap to change the controller's index and change the actively displayed tab in CupertinoTabScaffold's own main content area.

If translucent, the main content may slide behind it. Otherwise, the main content's bottom margin will be offset by its height.

By default tabBar disables text scaling to match the native iOS behavior. To override this behavior, wrap each of the tabBar's items inside a MediaQuery with the desired TextScaler.


final CupertinoTabBar tabBar;