getNavBar method
Widget
getNavBar(
- DeviceType device, {
- double? elevation,
- Color? appBarColor,
- Color? drawerColor,
- bool? extendBodyBehindAppBar,
- PageIndicator? pageIndicator,
- double? indicatorLineThickness,
- NavItemPosition? itemPosition,
- BoxDecoration? customDecoration,
- Widget? drawerBody,
- double? navItemSpacing,
- NavItemPosition? itemsPosition,
- TextStyle? navTextStyle,
- bool? showFab,
- Widget? title,
- String? titleText,
- double? height,
- Widget? fab,
- bool? enableDrawer,
- NavDrawerMode? drawerMode,
- Color? backgroundColor,
- Widget? leading,
- List<Widget>? actions,
- List<NavItem>? navItems,
- AnimationType? navItemAnimation,
})
Implementation
Widget getNavBar(
DeviceType device, {
double? elevation,
Color? appBarColor,
Color? drawerColor,
bool? extendBodyBehindAppBar,
PageIndicator? pageIndicator,
double? indicatorLineThickness,
NavItemPosition? itemPosition,
BoxDecoration? customDecoration,
Widget? drawerHeader,
Widget? drawerBody,
Widget? drawerFooter,
double? navItemSpacing,
NavItemPosition? itemsPosition,
TextStyle? navTextStyle,
bool? showFab,
Widget? title,
String? titleText,
double? height,
Widget? fab,
bool? enableDrawer,
NavDrawerMode? drawerMode,
Color? backgroundColor,
Widget? leading,
List<Widget>? actions,
List<NavItem>? navItems,
AnimationType? navItemAnimation
}) {
Widget child = Container();
switch (device) {
case DeviceType.mobile:
child = MobNavBar(
title: title ?? this.title,
navItems: items,
fab: fab ?? this.fab,
showFab: showFab ?? this.showFab,
body: body,
navItemAnimation: navItemAnimation ?? this.navItemAnimation,
extendBodyBehindAppBar: extendBodyBehindAppBar ?? this.extendBodyBehindAppBar,
elevation: elevation ?? this.elevation,
customDecoration: customDecoration??this.customDecoration,
drawerBody: drawerBody??this.drawerBody,
drawerFooter: drawerFooter??this.drawerFooter,
drawerHeader: drawerHeader??this.drawerHeader,
indicatorLineThickness: indicatorLineThickness ?? this.indicatorLineThickness,
pageIndicator: pageIndicator ?? this.pageIndicator,
navItemSpacing: navItemSpacing ?? this.navItemSpacing,
MAX_PAGE_WIDTH: MAX_PAGE_WIDTH,
itemPosition: itemsPosition ?? this.itemsPosition,
drawerMode: drawerMode ?? this.drawerMode,
height: height ?? this.height,
navTextStyle: navTextStyle ?? this.navTextStyle,
titleText: titleText ?? this.titleText,
appBarColor: appBarColor ?? this.appBarColor,
drawerColor: drawerColor ?? this.drawerColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
actions: actions ?? this.actions,
leading: leading ?? this.leading);
break;
default:
child = DefaultNavBar(
title: title ?? this.title,
items: items,
fab: fab ?? this.fab,
enableDrawer: enableDrawer ??this.enableDrawer,
showFab: showFab ?? this.showFab,
body: body,
navItemAnimation: navItemAnimation ?? this.navItemAnimation,
extendBodyBehindAppBar: extendBodyBehindAppBar ?? this.extendBodyBehindAppBar,
elevation: elevation ?? this.elevation,
customDecoration: customDecoration??this.customDecoration,
drawerBody: drawerBody??this.drawerBody,
drawerFooter: drawerFooter??this.drawerFooter,
drawerHeader: drawerHeader??this.drawerHeader,
indicatorLineThickness: indicatorLineThickness ?? this.indicatorLineThickness,
pageIndicator: pageIndicator ?? this.pageIndicator,
navItemSpacing: navItemSpacing ?? this.navItemSpacing,
MAX_PAGE_WIDTH: MAX_PAGE_WIDTH,
itemPosition: itemsPosition ?? this.itemsPosition,
drawerMode: drawerMode ?? this.drawerMode,
height: height ?? this.height,
navTextStyle: navTextStyle ?? this.navTextStyle,
titleText: titleText ?? this.titleText,
appBarColor: appBarColor ?? this.appBarColor,
drawerColor: drawerColor ?? this.drawerColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
actions: actions ?? this.actions,
leading: leading ?? this.leading);
break;
}
return PageTrackerContext<int>(child: child, currentData: 0);
}