panelAppBar function

dynamic panelAppBar (
  1. bool isShuttle,
  2. dynamic panelController,
  3. dynamic tabController,
  4. 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,
    ),
  );
}