panelAppBar function
dynamic
panelAppBar
(- bool isShuttle,
- dynamic panelController,
- dynamic tabController,
- List tabs
)
Implementation
Widget panelAppBar(bool isShuttle, PanelController panelController,
TabController tabController, List<Widget> tabs) {
return AppBar(
centerTitle: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
),
),
title: Text(isShuttle ? 'Shuttle Schedules' : 'Bus Schedules'),
leading: IconButton(
icon: Icon(Icons.arrow_downward),
onPressed: () {
panelController.animatePanelToPosition(0);
},
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.arrow_downward),
onPressed: () {
panelController.animatePanelToPosition(0);
},
)
],
bottom: TabBar(
unselectedLabelColor: Colors.white.withOpacity(0.3),
indicatorColor: Colors.white,
controller: tabController,
tabs: tabs,
),
);
}