Creates a copy of this app bar but with the given fields replaced with the new values.
Source
AppBar copyWith({ Key key, Widget leading, Widget title, List<Widget> actions, Widget flexibleSpace, AppBarBottomWidget bottom, int elevation, Color backgroundColor, Brightness brightness, TextTheme textTheme, EdgeInsets padding, Object heroTag, double expandedHeight, double collapsedHeight }) { return new AppBar( key: key ?? this.key, leading: leading ?? this.leading, title: title ?? this.title, actions: actions ?? this.actions, flexibleSpace: flexibleSpace ?? this.flexibleSpace, bottom: bottom ?? this.bottom, elevation: elevation ?? this.elevation, backgroundColor: backgroundColor ?? this.backgroundColor, brightness: brightness ?? this.brightness, iconTheme: iconTheme ?? this.iconTheme, textTheme: textTheme ?? this.textTheme, padding: padding ?? this.padding, centerTitle: centerTitle ?? this.centerTitle, heroTag: heroTag ?? this.heroTag, expandedHeight: expandedHeight ?? this._expandedHeight, collapsedHeight: collapsedHeight ?? this._collapsedHeight ); }