copyWith method

Bar copyWith({
  1. Key? key,
  2. List<Widget>? trailing,
  3. List<Widget>? leading,
  4. Widget? barHeader,
  5. Widget? barFooter,
  6. Widget? child,
  7. Widget? title,
  8. String? titleText,
  9. String? headerText,
  10. String? subtitleText,
  11. Widget? header,
  12. Widget? subtitle,
  13. bool? trailingExpanded,
  14. Alignment? alignment,
  15. Color? backgroundColor,
  16. double? leadingGap,
  17. double? trailingGap,
  18. EdgeInsetsGeometry? padding,
  19. double? height,
  20. bool? useGlass,
  21. BarBackButtonMode? backButton,
  22. 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,
    );