copyWith method Null safety
- {Color? backgroundColor,
- double? elevation,
- TextStyle? unselectedLabelTextStyle,
- TextStyle? selectedLabelTextStyle,
- IconThemeData? unselectedIconTheme,
- IconThemeData? selectedIconTheme,
- double? groupAlignment,
- NavigationRailLabelType? labelType,
- bool? useIndicator,
- Color? indicatorColor,
- double? minWidth,
- double? minExtendedWidth}
Creates a copy of this object with the given fields replaced with the new values.
Implementation
NavigationRailThemeData copyWith({
Color? backgroundColor,
double? elevation,
TextStyle? unselectedLabelTextStyle,
TextStyle? selectedLabelTextStyle,
IconThemeData? unselectedIconTheme,
IconThemeData? selectedIconTheme,
double? groupAlignment,
NavigationRailLabelType? labelType,
bool? useIndicator,
Color? indicatorColor,
double? minWidth,
double? minExtendedWidth,
}) {
return NavigationRailThemeData(
backgroundColor: backgroundColor ?? this.backgroundColor,
elevation: elevation ?? this.elevation,
unselectedLabelTextStyle: unselectedLabelTextStyle ?? this.unselectedLabelTextStyle,
selectedLabelTextStyle: selectedLabelTextStyle ?? this.selectedLabelTextStyle,
unselectedIconTheme: unselectedIconTheme ?? this.unselectedIconTheme,
selectedIconTheme: selectedIconTheme ?? this.selectedIconTheme,
groupAlignment: groupAlignment ?? this.groupAlignment,
labelType: labelType ?? this.labelType,
useIndicator: useIndicator ?? this.useIndicator,
indicatorColor: indicatorColor ?? this.indicatorColor,
minWidth: minWidth ?? this.minWidth,
minExtendedWidth: minExtendedWidth ?? this.minExtendedWidth,
);
}