copyWith method

SearchBarThemeData copyWith({
  1. WidgetStateProperty<double?>? elevation,
  2. WidgetStateProperty<Color?>? backgroundColor,
  3. WidgetStateProperty<Color?>? shadowColor,
  4. WidgetStateProperty<Color?>? surfaceTintColor,
  5. WidgetStateProperty<Color?>? overlayColor,
  6. WidgetStateProperty<BorderSide?>? side,
  7. WidgetStateProperty<OutlinedBorder?>? shape,
  8. WidgetStateProperty<EdgeInsetsGeometry?>? padding,
  9. WidgetStateProperty<TextStyle?>? textStyle,
  10. WidgetStateProperty<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({
  WidgetStateProperty<double?>? elevation,
  WidgetStateProperty<Color?>? backgroundColor,
  WidgetStateProperty<Color?>? shadowColor,
  WidgetStateProperty<Color?>? surfaceTintColor,
  WidgetStateProperty<Color?>? overlayColor,
  WidgetStateProperty<BorderSide?>? side,
  WidgetStateProperty<OutlinedBorder?>? shape,
  WidgetStateProperty<EdgeInsetsGeometry?>? padding,
  WidgetStateProperty<TextStyle?>? textStyle,
  WidgetStateProperty<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,
  );
}