bottomNavigationBarThemeData static method

BottomNavigationBarThemeData bottomNavigationBarThemeData(
  1. Palette colors,
  2. double scale,
  3. TextTheme textTheme
)

Implementation

static BottomNavigationBarThemeData bottomNavigationBarThemeData(
  Palette colors,
  double scale,
  TextTheme textTheme,
) {
  return BottomNavigationBarThemeData(
    backgroundColor: colors.background,
    elevation: 0,
    type: BottomNavigationBarType.fixed,
    // If this isn't specified, text becomes tertiary something...
    selectedItemColor: colors.text,
    unselectedItemColor: colors.backgroundText,
    selectedIconTheme: iconThemeData(colors, scale),
    unselectedIconTheme: iconThemeData(colors, scale),
    selectedLabelStyle: textTheme.labelSmall!.copyWith(
      color: colors.fillText,
    ),
    unselectedLabelStyle: textTheme.labelSmall!.copyWith(
      color: colors.backgroundText,
    ),
    showSelectedLabels: true,
    showUnselectedLabels: true,

    // Don't specify: this allows the widget to switch between fixed and
    // shifting based on the number of items.
    // type: BottomNavigationBarType.fixed,
    enableFeedback: true,
    // Don't specify, allows widget to default to spread
    // landscapeLayout: BottomNavigationBarLandscapeLayout.centered,

    // Don't specify, allows widget to default to MaterialStateMouseCursor.clickable
    // mouseCursor:
  );
}