PersistentTabView.custom constructor
const
PersistentTabView.custom(
- BuildContext context, {
- required Widget customWidget,
- required int itemCount,
- required List<
CustomNavBarScreen> screens, - Key? key,
- PersistentTabController? controller,
- EdgeInsets margin = EdgeInsets.zero,
- Widget? floatingActionButton,
- bool resizeToAvoidBottomInset = false,
- double? bottomScreenMargin,
- dynamic selectedTabScreenContext()?,
- Color backgroundColor = CupertinoColors.white,
- bool confineToSafeArea = true,
- Future<
bool> onWillPop()?, - HideOnScrollSettings hideOnScrollSettings = const HideOnScrollSettings(),
- bool stateManagement = true,
- bool handleAndroidBackButtonPress = true,
- bool isVisible = true,
- NavBarAnimationSettings animationSettings = const NavBarAnimationSettings(),
Implementation
const PersistentTabView.custom(
this.context, {
required final Widget customWidget,
required final int itemCount,
required final List<CustomNavBarScreen> screens,
final Key? key,
this.controller,
this.margin = EdgeInsets.zero,
this.floatingActionButton,
this.resizeToAvoidBottomInset = false,
this.bottomScreenMargin,
this.selectedTabScreenContext,
this.hideNavigationBarWhenKeyboardAppears = true,
this.backgroundColor = CupertinoColors.white,
this.confineToSafeArea = true,
this.onWillPop,
this.hideOnScrollSettings = const HideOnScrollSettings(),
this.stateManagement = true,
this.handleAndroidBackButtonPress = true,
// this.navBarPosition = NavBarPosition.bottom,
this.isVisible = true,
this.animationSettings = const NavBarAnimationSettings(),
final double navBarHeight = kBottomNavigationBarHeight,
}) : assert(itemCount == screens.length,
"screens and items length should be same. If you are using the onPressed callback function of 'PersistentBottomNavBarItem', enter a dummy screen like Container() in its place in the screens"),
super(
key: key,
context: context,
customNavBarScreens: screens,
controller: controller,
margin: margin,
hideOnScrollSettings: hideOnScrollSettings,
backgroundColor: backgroundColor,
floatingActionButton: floatingActionButton,
customWidget: customWidget,
itemCount: itemCount,
resizeToAvoidBottomInset: resizeToAvoidBottomInset,
bottomScreenMargin: bottomScreenMargin,
onWillPop: onWillPop,
confineToSafeArea: confineToSafeArea,
stateManagement: stateManagement,
handleAndroidBackButtonPress: handleAndroidBackButtonPress,
isVisible: isVisible,
isCustomWidget: true,
decoration: const NavBarDecoration(),
navBarPosition: NavBarPosition.bottom,
navBarHeight: navBarHeight,
);