copyWith method

NavigationBarThemeData copyWith(
  1. {double? height,
  2. Color? backgroundColor,
  3. double? elevation,
  4. Color? shadowColor,
  5. Color? surfaceTintColor,
  6. Color? indicatorColor,
  7. ShapeBorder? indicatorShape,
  8. MaterialStateProperty<TextStyle?>? labelTextStyle,
  9. MaterialStateProperty<IconThemeData?>? iconTheme,
  10. NavigationDestinationLabelBehavior? labelBehavior,
  11. MaterialStateProperty<Color?>? overlayColor}
)

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

Implementation

NavigationBarThemeData copyWith({
  double? height,
  Color? backgroundColor,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  Color? indicatorColor,
  ShapeBorder? indicatorShape,
  MaterialStateProperty<TextStyle?>? labelTextStyle,
  MaterialStateProperty<IconThemeData?>? iconTheme,
  NavigationDestinationLabelBehavior? labelBehavior,
  MaterialStateProperty<Color?>? overlayColor,
}) {
  return NavigationBarThemeData(
    height: height ?? this.height,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    indicatorColor: indicatorColor ?? this.indicatorColor,
    indicatorShape: indicatorShape ?? this.indicatorShape,
    labelTextStyle: labelTextStyle ?? this.labelTextStyle,
    iconTheme: iconTheme ?? this.iconTheme,
    labelBehavior: labelBehavior ?? this.labelBehavior,
    overlayColor: overlayColor ?? this.overlayColor,
  );
}