copyWith method

BottomNavigationBarThemeData copyWith({
  1. Color? backgroundColor,
  2. double? elevation,
  3. IconThemeData? selectedIconTheme,
  4. IconThemeData? unselectedIconTheme,
  5. Color? selectedItemColor,
  6. Color? unselectedItemColor,
  7. TextStyle? selectedLabelStyle,
  8. TextStyle? unselectedLabelStyle,
  9. bool? showSelectedLabels,
  10. bool? showUnselectedLabels,
  11. BottomNavigationBarType? type,
  12. bool? enableFeedback,
  13. BottomNavigationBarLandscapeLayout? landscapeLayout,
  14. MaterialStateProperty<MouseCursor?>? mouseCursor,
})

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

BottomNavigationBarThemeData copyWith({
  Color? backgroundColor,
  double? elevation,
  IconThemeData? selectedIconTheme,
  IconThemeData? unselectedIconTheme,
  Color? selectedItemColor,
  Color? unselectedItemColor,
  TextStyle? selectedLabelStyle,
  TextStyle? unselectedLabelStyle,
  bool? showSelectedLabels,
  bool? showUnselectedLabels,
  BottomNavigationBarType? type,
  bool? enableFeedback,
  BottomNavigationBarLandscapeLayout? landscapeLayout,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
}) {
  return BottomNavigationBarThemeData(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    elevation: elevation ?? this.elevation,
    selectedIconTheme: selectedIconTheme ?? this.selectedIconTheme,
    unselectedIconTheme: unselectedIconTheme ?? this.unselectedIconTheme,
    selectedItemColor: selectedItemColor ?? this.selectedItemColor,
    unselectedItemColor: unselectedItemColor ?? this.unselectedItemColor,
    selectedLabelStyle: selectedLabelStyle ?? this.selectedLabelStyle,
    unselectedLabelStyle: unselectedLabelStyle ?? this.unselectedLabelStyle,
    showSelectedLabels: showSelectedLabels ?? this.showSelectedLabels,
    showUnselectedLabels: showUnselectedLabels ?? this.showUnselectedLabels,
    type: type ?? this.type,
    enableFeedback: enableFeedback ?? this.enableFeedback,
    landscapeLayout: landscapeLayout ?? this.landscapeLayout,
    mouseCursor: mouseCursor ?? this.mouseCursor,
  );
}