copyWith method

SearchBarThemeData copyWith({
  1. MaterialStateProperty<double?>? elevation,
  2. MaterialStateProperty<Color?>? backgroundColor,
  3. MaterialStateProperty<Color?>? shadowColor,
  4. MaterialStateProperty<Color?>? surfaceTintColor,
  5. MaterialStateProperty<Color?>? overlayColor,
  6. MaterialStateProperty<BorderSide?>? side,
  7. MaterialStateProperty<OutlinedBorder?>? shape,
  8. MaterialStateProperty<EdgeInsetsGeometry?>? padding,
  9. MaterialStateProperty<TextStyle?>? textStyle,
  10. MaterialStateProperty<TextStyle?>? hintStyle,
  11. BoxConstraints? constraints,
  12. TextCapitalization? textCapitalization,
})

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

SearchBarThemeData copyWith({
  MaterialStateProperty<double?>? elevation,
  MaterialStateProperty<Color?>? backgroundColor,
  MaterialStateProperty<Color?>? shadowColor,
  MaterialStateProperty<Color?>? surfaceTintColor,
  MaterialStateProperty<Color?>? overlayColor,
  MaterialStateProperty<BorderSide?>? side,
  MaterialStateProperty<OutlinedBorder?>? shape,
  MaterialStateProperty<EdgeInsetsGeometry?>? padding,
  MaterialStateProperty<TextStyle?>? textStyle,
  MaterialStateProperty<TextStyle?>? hintStyle,
  BoxConstraints? constraints,
  TextCapitalization? textCapitalization,
}) {
  return SearchBarThemeData(
    elevation: elevation ?? this.elevation,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    overlayColor: overlayColor ?? this.overlayColor,
    side: side ?? this.side,
    shape: shape ?? this.shape,
    padding: padding ?? this.padding,
    textStyle: textStyle ?? this.textStyle,
    hintStyle: hintStyle ?? this.hintStyle,
    constraints: constraints ?? this.constraints,
    textCapitalization: textCapitalization ?? this.textCapitalization,
  );
}