copyWith method
- @useResult
- Brightness? keyboardAppearance,
- Color? cursorColor,
- Color? fillColor,
- bool? filled,
- EdgeInsetsGeometry? contentPadding,
- EdgeInsetsGeometry? clearButtonPadding,
- EdgeInsetsGeometry? obscureButtonPadding,
- EdgeInsets? scrollPadding,
- FButtonStyle clearButtonStyle(
- FButtonStyle style
- FButtonStyle obscureButtonStyle(
- FButtonStyle style
- FWidgetStateMap<
TextStyle> ? contentTextStyle, - FWidgetStateMap<
TextStyle> ? hintTextStyle, - FWidgetStateMap<
TextStyle> ? counterTextStyle, - FWidgetStateMap<
InputBorder> ? border, - EdgeInsetsGeometry? labelPadding,
- EdgeInsetsGeometry? descriptionPadding,
- EdgeInsetsGeometry? errorPadding,
- EdgeInsetsGeometry? childPadding,
- FWidgetStateMap<
TextStyle> ? labelTextStyle, - FWidgetStateMap<
TextStyle> ? descriptionTextStyle, - TextStyle? errorTextStyle,
Returns a copy of this FTextFieldStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FTextFieldStyle.keyboardAppearance - The appearance of the keyboard.
- FTextFieldStyle.cursorColor - The color of the cursor.
- FTextFieldStyle.fillColor - The base fill color of the decoration's container colors.
- FTextFieldStyle.filled - If true the decoration's container is filled with
fillColor
. - FTextFieldStyle.contentPadding - The padding surrounding this text field's content.
- FTextFieldStyle.clearButtonPadding - The padding surrounding the clear button.
- FTextFieldStyle.obscureButtonPadding - The padding surrounding the obscured text toggle.
- FTextFieldStyle.scrollPadding - Configures padding to edges surrounding a Scrollable when this text field scrolls into view.
- FTextFieldStyle.clearButtonStyle - The clear button's style when [FTextField.
- FTextFieldStyle.obscureButtonStyle - The obscured text toggle's style when enabled in [FTextField.
- FTextFieldStyle.contentTextStyle - The content's TextStyle.
- FTextFieldStyle.hintTextStyle - The hint's TextStyle.
- FTextFieldStyle.counterTextStyle - The counter's TextStyle.
- FTextFieldStyle.border - The border.
- FTextFieldStyle.labelPadding - The label's padding.
- FTextFieldStyle.descriptionPadding - The description's padding.
- FTextFieldStyle.errorPadding - The error's padding.
- FTextFieldStyle.childPadding - The child's padding.
- FTextFieldStyle.labelTextStyle - The label's text style.
- FTextFieldStyle.descriptionTextStyle - The description's text style.
- FTextFieldStyle.errorTextStyle - The error's text style.
Implementation
@useResult
FTextFieldStyle copyWith({
Brightness? keyboardAppearance,
Color? cursorColor,
Color? fillColor,
bool? filled,
EdgeInsetsGeometry? contentPadding,
EdgeInsetsGeometry? clearButtonPadding,
EdgeInsetsGeometry? obscureButtonPadding,
EdgeInsets? scrollPadding,
FButtonStyle Function(FButtonStyle style)? clearButtonStyle,
FButtonStyle Function(FButtonStyle style)? obscureButtonStyle,
FWidgetStateMap<TextStyle>? contentTextStyle,
FWidgetStateMap<TextStyle>? hintTextStyle,
FWidgetStateMap<TextStyle>? counterTextStyle,
FWidgetStateMap<InputBorder>? border,
EdgeInsetsGeometry? labelPadding,
EdgeInsetsGeometry? descriptionPadding,
EdgeInsetsGeometry? errorPadding,
EdgeInsetsGeometry? childPadding,
FWidgetStateMap<TextStyle>? labelTextStyle,
FWidgetStateMap<TextStyle>? descriptionTextStyle,
TextStyle? errorTextStyle,
}) => FTextFieldStyle(
keyboardAppearance: keyboardAppearance ?? this.keyboardAppearance,
cursorColor: cursorColor ?? this.cursorColor,
fillColor: fillColor ?? this.fillColor,
filled: filled ?? this.filled,
contentPadding: contentPadding ?? this.contentPadding,
clearButtonPadding: clearButtonPadding ?? this.clearButtonPadding,
obscureButtonPadding: obscureButtonPadding ?? this.obscureButtonPadding,
scrollPadding: scrollPadding ?? this.scrollPadding,
clearButtonStyle: clearButtonStyle != null ? clearButtonStyle(this.clearButtonStyle) : this.clearButtonStyle,
obscureButtonStyle: obscureButtonStyle != null
? obscureButtonStyle(this.obscureButtonStyle)
: this.obscureButtonStyle,
contentTextStyle: contentTextStyle ?? this.contentTextStyle,
hintTextStyle: hintTextStyle ?? this.hintTextStyle,
counterTextStyle: counterTextStyle ?? this.counterTextStyle,
border: border ?? this.border,
labelPadding: labelPadding ?? this.labelPadding,
descriptionPadding: descriptionPadding ?? this.descriptionPadding,
errorPadding: errorPadding ?? this.errorPadding,
childPadding: childPadding ?? this.childPadding,
labelTextStyle: labelTextStyle ?? this.labelTextStyle,
descriptionTextStyle: descriptionTextStyle ?? this.descriptionTextStyle,
errorTextStyle: errorTextStyle ?? this.errorTextStyle,
);