copyWith method
TNumberFieldTheme
copyWith({
- TInputSize? size,
- TInputDecorationType? decorationType,
- WidgetStateProperty<
Color> ? color, - WidgetStateProperty<
Color> ? backgroundColor, - WidgetStateProperty<
Color> ? borderColor, - WidgetStateProperty<
TextStyle> ? labelStyle, - WidgetStateProperty<
TextStyle> ? helperTextStyle, - WidgetStateProperty<
TextStyle> ? errorTextStyle, - WidgetStateProperty<
TextStyle> ? tagStyle, - WidgetStateProperty<
BoxDecoration> ? decoration, - WidgetStateProperty<
double> ? borderRadius, - WidgetStateProperty<
double> ? borderWidth, - WidgetStateProperty<
LabelBuilder> ? labelBuilder, - WidgetStateProperty<
HelperTextBuilder> ? helperTextBuilder, - WidgetStateProperty<
ErrorsBuilder> ? errorsBuilder, - WidgetStateProperty<
TextStyle> ? textStyle, - WidgetStateProperty<
TextStyle> ? hintStyle, - Widget? preWidget,
- Widget? postWidget,
- double? height,
- EdgeInsets? padding,
- double? fontSize,
- List<
TextInputFormatter> ? inputFormatters, - TextInputType? keyboardType,
- TextCapitalization? textCapitalization,
- bool? autocorrect,
- bool? enableSuggestions,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- TextInputAction? textInputAction,
- bool? obscureText,
- num? increment,
- num? decrement,
- int? decimals,
- StepperButtonBuilder? decreaseButtonBuilder,
- StepperButtonBuilder? increaseButtonBuilder,
- StepperBuilder? stepperBuilder,
override
Implementation
@override
TNumberFieldTheme copyWith({
TInputSize? size,
TInputDecorationType? decorationType,
WidgetStateProperty<Color>? color,
WidgetStateProperty<Color>? backgroundColor,
WidgetStateProperty<Color>? borderColor,
WidgetStateProperty<TextStyle>? labelStyle,
WidgetStateProperty<TextStyle>? helperTextStyle,
WidgetStateProperty<TextStyle>? errorTextStyle,
WidgetStateProperty<TextStyle>? tagStyle,
WidgetStateProperty<BoxDecoration>? decoration,
WidgetStateProperty<double>? borderRadius,
WidgetStateProperty<double>? borderWidth,
WidgetStateProperty<LabelBuilder>? labelBuilder,
WidgetStateProperty<HelperTextBuilder>? helperTextBuilder,
WidgetStateProperty<ErrorsBuilder>? errorsBuilder,
WidgetStateProperty<TextStyle>? textStyle,
WidgetStateProperty<TextStyle>? hintStyle,
Widget? preWidget,
Widget? postWidget,
double? height,
EdgeInsets? padding,
double? fontSize,
List<TextInputFormatter>? inputFormatters,
TextInputType? keyboardType,
TextCapitalization? textCapitalization,
bool? autocorrect,
bool? enableSuggestions,
int? maxLength,
MaxLengthEnforcement? maxLengthEnforcement,
TextInputAction? textInputAction,
bool? obscureText,
num? increment,
num? decrement,
int? decimals,
StepperButtonBuilder? decreaseButtonBuilder,
StepperButtonBuilder? increaseButtonBuilder,
StepperBuilder? stepperBuilder,
}) {
final baseTheme = super.copyWith(
size: size,
decorationType: decorationType,
color: color,
backgroundColor: backgroundColor,
borderColor: borderColor,
labelStyle: labelStyle,
helperTextStyle: helperTextStyle,
errorTextStyle: errorTextStyle,
tagStyle: tagStyle,
decoration: decoration,
borderRadius: borderRadius,
borderWidth: borderWidth,
labelBuilder: labelBuilder,
helperTextBuilder: helperTextBuilder,
errorsBuilder: errorsBuilder,
textStyle: textStyle,
hintStyle: hintStyle,
preWidget: preWidget,
postWidget: postWidget,
height: height,
padding: padding,
fontSize: fontSize,
inputFormatters: inputFormatters,
keyboardType: keyboardType,
textCapitalization: textCapitalization,
autocorrect: autocorrect,
enableSuggestions: enableSuggestions,
maxLength: maxLength,
maxLengthEnforcement: maxLengthEnforcement,
textInputAction: textInputAction,
obscureText: obscureText,
);
return TNumberFieldTheme(
// Text field properties from parent
size: baseTheme.size,
decorationType: baseTheme.decorationType,
color: baseTheme.color,
backgroundColor: baseTheme.backgroundColor,
borderColor: baseTheme.borderColor,
labelStyle: baseTheme.labelStyle,
helperTextStyle: baseTheme.helperTextStyle,
errorTextStyle: baseTheme.errorTextStyle,
tagStyle: baseTheme.tagStyle,
decoration: baseTheme.decoration,
borderRadius: baseTheme.borderRadius,
borderWidth: baseTheme.borderWidth,
labelBuilder: baseTheme.labelBuilder,
helperTextBuilder: baseTheme.helperTextBuilder,
errorsBuilder: baseTheme.errorsBuilder,
textStyle: baseTheme.textStyle,
hintStyle: baseTheme.hintStyle,
preWidget: baseTheme.preWidget,
postWidget: baseTheme.postWidget,
height: baseTheme.height,
padding: baseTheme.padding,
fontSize: baseTheme.fontSize,
inputFormatters: baseTheme.inputFormatters,
keyboardType: baseTheme.keyboardType,
textCapitalization: baseTheme.textCapitalization,
autocorrect: baseTheme.autocorrect,
enableSuggestions: baseTheme.enableSuggestions,
maxLength: baseTheme.maxLength,
maxLengthEnforcement: baseTheme.maxLengthEnforcement,
textInputAction: baseTheme.textInputAction,
obscureText: baseTheme.obscureText,
// Number-specific properties
increment: increment ?? this.increment,
decrement: decrement ?? this.decrement,
decimals: decimals ?? this.decimals,
increaseButtonBuilder: increaseButtonBuilder ?? this.increaseButtonBuilder,
decreaseButtonBuilder: decreaseButtonBuilder ?? this.decreaseButtonBuilder,
stepperBuilder: stepperBuilder ?? this.stepperBuilder,
);
}