buildNavBar method
Implementation
@override
AppBar buildNavBar(BuildContext context) {
// TODO: implement buildNavBar
return AppBar(
leading: Padding(
padding: const EdgeInsets.only(left: 5.0),
child: Center(
child: Row(
children: [
enableDrawer ?? false
? drawerMode == NavDrawerMode.left
? IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
scaffoldKey.currentState!.openDrawer();
},
)
: Container()
: Container(),
leading ?? Container()
],
)),
),
leadingWidth: enableDrawer == true ? 120 : 75,
elevation: elevation ?? 0,
iconTheme: Theme.of(context)
.iconTheme
.copyWith(color: Theme.of(context).textTheme.bodyText1!.color),
backgroundColor: appBarColor ?? Colors.transparent,
title: Container(
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10),
child: Container(
constraints: BoxConstraints(maxWidth: MAX_PAGE_WIDTH),
child: Row(
mainAxisAlignment: itemsPosition == NavItemPosition.center
? MainAxisAlignment.center
: itemsPosition == NavItemPosition.left
? MainAxisAlignment.start
: MainAxisAlignment.end,
children: [
Row(children: [
title,
...(enableDrawer ?? false ? [] : _buildNavList(context))
]),
],
),
),
),
actions: [
...?actions,
enableDrawer ?? false
? drawerMode == NavDrawerMode.right ||
drawerMode == NavDrawerMode.full
? IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
scaffoldKey.currentState!.openEndDrawer();
},
)
: Container()
: Container(),
],
);
}