autoHideOnModal property

bool autoHideOnModal
final

Whether the tab bar automatically hides itself while a modal/sheet is presented over its route.

On iOS, the underlying UITabBar is rendered as a native UIView via hybrid composition. When a Flutter-rendered modal sheet (e.g. one shown via showCupertinoSheet, showCupertinoModalPopup, or showModalBottomSheet) is presented over the route containing this tab bar, the platform view's z-order can interfere with the modal — specifically, Flutter-rendered widgets inside the modal (notably Material TextFields) may appear behind the tab bar's native layer and become invisible (Issue #31).

When this is true (default), CNTabBar listens to its ModalRoute.secondaryAnimation and renders an empty SizedBox in place of the platform view while a modal/sheet is on top. When the modal is dismissed, the platform view is restored. This matches the native iOS pattern where UITabBarController's tab bar is naturally hidden during full-screen modal presentations.

Set to false if you need the tab bar to remain visible behind modals (rare, and typically requires a native-only sheet that won't hit the z-order issue).

Implementation

final bool autoHideOnModal;