onCreateTabbar method

Widget? onCreateTabbar()

Implementation

Widget? onCreateTabbar() {
  if (tabbarItems.length < 2) return null;
  final bottomNavigationBar = BottomNavigationBar(
    elevation: 0,
    backgroundColor: bottomNavigationBarColor,
    items: tabbarItems,
    unselectedItemColor: unselectedItemColor,
    selectedItemColor: selectedItemColor,
    unselectedFontSize: unselectedFontSize,
    selectedFontSize: selectedFontSize,
    currentIndex: currentIndex,
    type: tabbarType,
    onTap: (index) {
      currentIndex = index;
      reload();
      curIndexChanged();
    },
  );

  return Theme(
      data: ThemeData(
        brightness: Brightness.dark,
        splashColor: Colors.transparent,
        highlightColor: Colors.transparent,
      ),
      child: bottomNavigationBar);
}