PersistentTabView.custom constructor

const PersistentTabView.custom(
  1. BuildContext context, {
  2. required Widget customWidget,
  3. required int itemCount,
  4. required List<CustomNavBarScreen> screens,
  5. Key? key,
  6. PersistentTabController? controller,
  7. EdgeInsets margin = EdgeInsets.zero,
  8. Widget? floatingActionButton,
  9. bool resizeToAvoidBottomInset = false,
  10. double? bottomScreenMargin,
  11. dynamic selectedTabScreenContext(
    1. BuildContext?
    )?,
  12. bool hideNavigationBarWhenKeyboardAppears = true,
  13. Color backgroundColor = CupertinoColors.white,
  14. bool confineToSafeArea = true,
  15. Future<bool> onWillPop(
    1. BuildContext?
    )?,
  16. HideOnScrollSettings hideOnScrollSettings = const HideOnScrollSettings(),
  17. bool stateManagement = true,
  18. bool handleAndroidBackButtonPress = true,
  19. bool isVisible = true,
  20. NavBarAnimationSettings animationSettings = const NavBarAnimationSettings(),
  21. double navBarHeight = kBottomNavigationBarHeight,
})

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,
      );