copyWith method
Bar
copyWith({
- Key? key,
- List<
Widget> ? trailing, - List<
Widget> ? leading, - Widget? barHeader,
- Widget? child,
- Widget? title,
- String? titleText,
- String? headerText,
- String? subtitleText,
- Widget? header,
- Widget? subtitle,
- bool? trailingExpanded,
- Alignment? alignment,
- Color? backgroundColor,
- double? leadingGap,
- double? trailingGap,
- EdgeInsetsGeometry? padding,
- double? height,
- bool? useGlass,
- BarBackButtonMode? backButton,
- bool? ignoreContextSignals,
Creates a copy of this Bar with the given fields replaced by new values.
This method is useful for making small modifications to an existing Bar. See Notes in the documentation.
Implementation
Bar copyWith({
Key? key,
List<Widget>? trailing,
List<Widget>? leading,
Widget? barHeader,
Widget? barFooter,
Widget? child,
Widget? title,
String? titleText,
String? headerText,
String? subtitleText,
Widget? header,
Widget? subtitle,
bool? trailingExpanded,
Alignment? alignment,
Color? backgroundColor,
double? leadingGap,
double? trailingGap,
EdgeInsetsGeometry? padding,
double? height,
bool? useGlass,
BarBackButtonMode? backButton,
bool? ignoreContextSignals,
}) =>
Bar(
barHeader: barHeader ?? this.barHeader,
key: key ?? this.key,
trailing: trailing ?? this.trailing,
leading: leading ?? this.leading,
title: title ?? this.title,
titleText: titleText ?? this.titleText,
headerText: headerText ?? this.headerText,
subtitleText: subtitleText ?? this.subtitleText,
header: header ?? this.header,
subtitle: subtitle ?? this.subtitle,
trailingExpanded: trailingExpanded ?? this.trailingExpanded,
alignment: alignment ?? this.alignment,
padding: padding ?? this.padding,
backgroundColor: backgroundColor ?? this.backgroundColor,
leadingGap: leadingGap ?? this.leadingGap,
trailingGap: trailingGap ?? this.trailingGap,
height: height ?? this.height,
useGlass: useGlass ?? this.useGlass,
backButton: backButton ?? this.backButton,
ignoreContextSignals: ignoreContextSignals ?? this.ignoreContextSignals,
child: child ?? this.child,
barFooter: barFooter ?? this.barFooter,
);