copyWith method
AutoCompleteTheme
copyWith({
- ValueGetter<
BoxConstraints?> ? popoverConstraints, - ValueGetter<
PopoverConstraint?> ? popoverWidthConstraint, - ValueGetter<
AlignmentDirectional?> ? popoverAnchorAlignment, - ValueGetter<
AlignmentDirectional?> ? popoverAlignment, - ValueGetter<
AutoCompleteMode?> ? mode,
Creates a copy of this theme with specified properties overridden.
Each parameter function is called only if provided, allowing selective overrides while preserving existing values for unspecified properties.
Implementation
AutoCompleteTheme copyWith({
ValueGetter<BoxConstraints?>? popoverConstraints,
ValueGetter<PopoverConstraint?>? popoverWidthConstraint,
ValueGetter<AlignmentDirectional?>? popoverAnchorAlignment,
ValueGetter<AlignmentDirectional?>? popoverAlignment,
ValueGetter<AutoCompleteMode?>? mode,
}) {
return AutoCompleteTheme(
popoverConstraints: popoverConstraints == null
? this.popoverConstraints
: popoverConstraints(),
popoverWidthConstraint: popoverWidthConstraint == null
? this.popoverWidthConstraint
: popoverWidthConstraint(),
popoverAnchorAlignment: popoverAnchorAlignment == null
? this.popoverAnchorAlignment
: popoverAnchorAlignment(),
popoverAlignment:
popoverAlignment == null ? this.popoverAlignment : popoverAlignment(),
mode: mode == null ? this.mode : mode(),
);
}