getSafeArea method

SafeArea getSafeArea(
  1. ZugClient client
)

Implementation

SafeArea getSafeArea(ZugClient client) {
  return SafeArea(
    child: BottomNavigationBar(
      fixedColor: Colors.black,
      type: BottomNavigationBarType.fixed,
      items: [
        widget.getMainNavigationBarItem(),
        const BottomNavigationBarItem(
          icon: Icon(Icons.local_bar),
          label: 'Lobby',
        ),
        const BottomNavigationBarItem(
          icon: Icon(Icons.settings),
          label: 'Settings',
        ),
      ],
      currentIndex: selectedIndex,
      onTap: (value) {
        if (!Dialogs.dialog) {
          setState(() {
            selectedIndex = value;
            PageType newPage = PageType.values.elementAt(selectedIndex);
            selectedPage = newPage;
            if (selectedPage == PageType.options && client.currentArea.exists) {
              widget.app.client.areaCmd(ClientMsg.getOptions);
            }
          });
        }
      },
    ),
  );
}