copyWith method Null safety
- {double? height,
- Color? backgroundColor,
- Color? surfaceTintColor,
- double? elevation,
- Color? indicatorColor,
- ShapeBorder? indicatorShape,
- MaterialStateProperty<
TextStyle?> ? labelTextStyle, - MaterialStateProperty<
IconThemeData?> ? iconTheme, - NavigationDestinationLabelBehavior? labelBehavior}
Creates a copy of this object with the given fields replaced with the new values.
Implementation
NavigationBarThemeData copyWith({
double? height,
Color? backgroundColor,
Color? surfaceTintColor,
double? elevation,
Color? indicatorColor,
ShapeBorder? indicatorShape,
MaterialStateProperty<TextStyle?>? labelTextStyle,
MaterialStateProperty<IconThemeData?>? iconTheme,
NavigationDestinationLabelBehavior? labelBehavior,
}) {
return NavigationBarThemeData(
height: height ?? this.height,
backgroundColor: backgroundColor ?? this.backgroundColor,
surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
elevation: elevation ?? this.elevation,
indicatorColor: indicatorColor ?? this.indicatorColor,
indicatorShape: indicatorShape ?? this.indicatorShape,
labelTextStyle: labelTextStyle ?? this.labelTextStyle,
iconTheme: iconTheme ?? this.iconTheme,
labelBehavior: labelBehavior ?? this.labelBehavior,
);
}