Implementation
NyTextField merge(InputDecoration decoration) {
return NyTextField(
labelText: decoration.labelText ?? labelText,
labelStyle: decoration.labelStyle ?? labelStyle,
controller: controller,
obscureText: obscureText,
maxLines: maxLines,
minLines: minLines,
keyboardType: keyboardType,
autoFocus: autoFocus,
validateOnFocusChange: validateOnFocusChange,
handleValidationError: handleValidationError,
textAlign: textAlign,
enableSuggestions: enableSuggestions,
focusNode: focusNode,
hintText: hintText,
hintStyle: hintStyle,
validationRules: validationRules,
dummyData: dummyData,
onChanged: onChanged,
style: style,
strutStyle: strutStyle,
textInputAction: textInputAction,
readOnly: readOnly,
showCursor: showCursor,
maxLength: maxLength,
enabled: enabled,
dragStartBehavior: dragStartBehavior,
cursorHeight: cursorHeight,
cursorRadius: cursorRadius,
cursorColor: cursorColor,
onTap: onTap,
onTapOutside: onTapOutside,
validationErrorMessage: validationErrorMessage,
mouseCursor: mouseCursor,
textCapitalization: textCapitalization,
maxLengthEnforcement: maxLengthEnforcement,
cursorWidth: cursorWidth,
onAppPrivateCommand: onAppPrivateCommand,
inputFormatters: inputFormatters,
expands: expands,
textAlignVertical: textAlignVertical,
textDirection: textDirection,
obscuringCharacter: obscuringCharacter,
autocorrect: autocorrect,
smartDashesType: smartDashesType,
smartQuotesType: smartQuotesType,
decoration: this.decoration?.copyWith(
fillColor: decoration.fillColor ?? this.decoration?.fillColor,
filled: decoration.filled ?? this.decoration?.filled,
focusedBorder:
decoration.focusedBorder ?? this.decoration?.focusedBorder,
enabledBorder:
decoration.enabledBorder ?? this.decoration?.enabledBorder,
contentPadding:
decoration.contentPadding ?? this.decoration?.contentPadding,
border: decoration.border ?? this.decoration?.border,
errorText: decoration.errorText ?? this.decoration?.errorText,
errorStyle: decoration.errorStyle ?? this.decoration?.errorStyle,
errorMaxLines:
decoration.errorMaxLines ?? this.decoration?.errorMaxLines,
suffixIcon: decoration.suffixIcon ?? this.decoration?.suffixIcon,
prefixIcon: decoration.prefixIcon ?? this.decoration?.prefixIcon,
suffix: decoration.suffix ?? this.decoration?.suffix,
prefix: decoration.prefix ?? this.decoration?.prefix,
suffixText: decoration.suffixText ?? this.decoration?.suffixText,
prefixText: decoration.prefixText ?? this.decoration?.prefixText,
suffixStyle: decoration.suffixStyle ?? this.decoration?.suffixStyle,
prefixStyle: decoration.prefixStyle ?? this.decoration?.prefixStyle,
suffixIconColor:
decoration.suffixIconColor ?? this.decoration?.suffixIconColor,
prefixIconColor:
decoration.prefixIconColor ?? this.decoration?.prefixIconColor,
suffixIconConstraints: decoration.suffixIconConstraints ??
this.decoration?.suffixIconConstraints,
prefixIconConstraints: decoration.prefixIconConstraints ??
this.decoration?.prefixIconConstraints,
counter: decoration.counter ?? this.decoration?.counter,
counterText: decoration.counterText ?? this.decoration?.counterText,
counterStyle:
decoration.counterStyle ?? this.decoration?.counterStyle,
focusColor: decoration.focusColor ?? this.decoration?.focusColor,
hoverColor: decoration.hoverColor ?? this.decoration?.hoverColor,
errorBorder: decoration.errorBorder ?? this.decoration?.errorBorder,
focusedErrorBorder: decoration.focusedErrorBorder ??
this.decoration?.focusedErrorBorder,
disabledBorder:
decoration.disabledBorder ?? this.decoration?.disabledBorder,
enabled: enabled ?? enabled,
semanticCounterText: decoration.semanticCounterText ??
this.decoration?.semanticCounterText,
alignLabelWithHint: decoration.alignLabelWithHint ??
this.decoration?.alignLabelWithHint,
constraints: decoration.constraints ?? this.decoration?.constraints,
),
onEditingComplete: onEditingComplete,
onSubmitted: onSubmitted,
scrollController: scrollController,
scrollPhysics: scrollPhysics,
autofillHints: autofillHints,
clipBehavior: clipBehavior,
passwordVisible: passwordVisible,
type: type,
prefixIcon: prefixIcon,
backgroundColor: backgroundColor,
borderRadius: borderRadius,
border: border,
focusedBorder: focusedBorder,
enabledBorder: enabledBorder,
contentPadding: contentPadding,
customValidationRule: customValidationRule,
header: header,
footer: footer,
clearable: clearable,
clearIcon: clearIcon,
mask: mask,
maskMatch: maskMatch,
maskedReturnValue: maskedReturnValue,
decorator: decorator,
);
}