copyWith method

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

Implementation

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