copyWith method

AppBar copyWith({
  1. Key? key,
  2. PreferredSizeWidget? bottom,
  3. Widget? leading,
  4. bool? automaticallyImplyLeading,
  5. Widget? title,
  6. List<Widget>? actions,
  7. Widget? flexibleSpace,
  8. double? elevation,
  9. Color? shadowColor,
  10. ShapeBorder? shape,
  11. Color? backgroundColor,
  12. Color? foregroundColor,
  13. IconThemeData? iconTheme,
  14. IconThemeData? actionsIconTheme,
  15. double? titleSpacing,
  16. bool? centerTitle,
  17. bool? excludeHeaderSemantics,
  18. TextStyle? titleTextStyle,
  19. SystemUiOverlayStyle? systemOverlayStyle,
  20. double? toolbarHeight,
  21. TextStyle? toolbarTextStyle,
  22. double? leadingWidth,
  23. double? toolbarOpacity,
  24. double? bottomOpacity,
  25. Color? surfaceTintColor,
  26. Clip? clipBehavior,
  27. bool? forceMaterialTransparency,
  28. bool notificationPredicate(
    1. ScrollNotification
    )?,
  29. bool? primary,
  30. double? scrolledUnderElevation,
})

Implementation

AppBar copyWith({
  Key? key,
  PreferredSizeWidget? bottom,
  Widget? leading,
  bool? automaticallyImplyLeading,
  Widget? title,
  List<Widget>? actions,
  Widget? flexibleSpace,
  double? elevation,
  Color? shadowColor,
  ShapeBorder? shape,
  Color? backgroundColor,
  Color? foregroundColor,
  IconThemeData? iconTheme,
  IconThemeData? actionsIconTheme,
  double? titleSpacing,
  bool? centerTitle,
  bool? excludeHeaderSemantics,
  TextStyle? titleTextStyle,
  SystemUiOverlayStyle? systemOverlayStyle,
  double? toolbarHeight,
  TextStyle? toolbarTextStyle,
  double? leadingWidth,
  double? toolbarOpacity,
  double? bottomOpacity,
  Color? surfaceTintColor,
  Clip? clipBehavior,
  bool? forceMaterialTransparency,
  bool Function(ScrollNotification)? notificationPredicate,
  bool? primary,
  double? scrolledUnderElevation,
}) =>
    AppBar(
      key: this.key ?? key,
      bottom: bottom ?? this.bottom,
      leading: leading ?? this.leading,
      automaticallyImplyLeading:
          automaticallyImplyLeading ?? this.automaticallyImplyLeading,
      title: title ?? this.title,
      actions: actions ?? this.actions,
      flexibleSpace: flexibleSpace ?? this.flexibleSpace,
      elevation: elevation ?? this.elevation,
      shadowColor: shadowColor ?? this.shadowColor,
      shape: shape ?? this.shape,
      backgroundColor: backgroundColor ?? this.backgroundColor,
      foregroundColor: foregroundColor ?? this.foregroundColor,
      iconTheme: iconTheme ?? this.iconTheme,
      actionsIconTheme: actionsIconTheme ?? this.actionsIconTheme,
      titleSpacing: titleSpacing ?? this.titleSpacing,
      centerTitle: centerTitle ?? this.centerTitle,
      excludeHeaderSemantics:
          excludeHeaderSemantics ?? this.excludeHeaderSemantics,
      titleTextStyle: titleTextStyle ?? this.titleTextStyle,
      systemOverlayStyle: systemOverlayStyle ?? this.systemOverlayStyle,
      toolbarHeight: toolbarHeight ?? this.toolbarHeight,
      toolbarTextStyle: toolbarTextStyle ?? this.toolbarTextStyle,
      leadingWidth: leadingWidth ?? this.leadingWidth,
      toolbarOpacity: toolbarOpacity ?? this.toolbarOpacity,
      bottomOpacity: bottomOpacity ?? this.bottomOpacity,
      surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
      clipBehavior: clipBehavior ?? this.clipBehavior,
      forceMaterialTransparency:
          forceMaterialTransparency ?? this.forceMaterialTransparency,
      notificationPredicate:
          notificationPredicate ?? this.notificationPredicate,
      primary: primary ?? this.primary,
      scrolledUnderElevation:
          scrolledUnderElevation ?? this.scrolledUnderElevation,
    );