copyWith method
SDropdown
copyWith({
- double? width,
- double? height,
- double? overlayHeight,
- double? overlayWidth,
- double? scale,
- List<
String> ? items, - String? selectedItem,
- String? initialItem,
- String? hintText,
- dynamic onChanged()?,
- TextStyle? itemTextStyle,
- TextStyle? headerTextStyle,
- TextStyle? hintTextStyle,
- Map<
String, TextStyle> ? itemSpecificStyles, - Color? closedFillColor,
- Color? expandedFillColor,
- Border? closedBorder,
- Border? expandedBorder,
- BorderRadius? closedBorderRadius,
- BorderRadius? expandedBorderRadius,
- EdgeInsets? closedHeaderPadding,
- EdgeInsets? expandedHeaderPadding,
- EdgeInsets? itemsListPadding,
- EdgeInsets? listItemPadding,
- ScrollController? itemsScrollController,
- bool? excludeSelected,
- bool? canCloseOutsideBounds,
- bool? enabled,
- AlignmentGeometry? alignment,
- int? maxLines,
- Widget? suffixIcon,
- Widget? prefixIcon,
- String? validator()?,
- bool? validateOnChange,
- SDropdownDecoration? decoration,
- SDropdownController? controller,
- FocusNode? focusNode,
- bool? requestFocusOnInit,
Creates a copy of this dropdown with modified properties
Implementation
SDropdown copyWith({
double? width,
double? height,
double? overlayHeight,
double? overlayWidth,
double? scale,
List<String>? items,
String? selectedItem,
String? initialItem,
String? hintText,
Function(String?)? onChanged,
TextStyle? itemTextStyle,
TextStyle? headerTextStyle,
TextStyle? hintTextStyle,
Map<String, TextStyle>? itemSpecificStyles,
Color? closedFillColor,
Color? expandedFillColor,
Border? closedBorder,
Border? expandedBorder,
BorderRadius? closedBorderRadius,
BorderRadius? expandedBorderRadius,
EdgeInsets? closedHeaderPadding,
EdgeInsets? expandedHeaderPadding,
EdgeInsets? itemsListPadding,
EdgeInsets? listItemPadding,
ScrollController? itemsScrollController,
bool? excludeSelected,
bool? canCloseOutsideBounds,
bool? enabled,
AlignmentGeometry? alignment,
int? maxLines,
Widget? suffixIcon,
Widget? prefixIcon,
String? Function(String?)? validator,
bool? validateOnChange,
SDropdownDecoration? decoration,
SDropdownController? controller,
bool? useKeyboardNavigation,
FocusNode? focusNode,
bool? requestFocusOnInit,
}) {
return SDropdown(
key: key,
items: items ?? this.items,
width: width ?? this.width,
height: height ?? this.height,
overlayHeight: overlayHeight ?? this.overlayHeight,
overlayWidth: overlayWidth ?? this.overlayWidth,
scale: scale ?? this.scale,
selectedItem: selectedItem ?? this.selectedItem,
initialItem: initialItem ?? this.initialItem,
hintText: hintText ?? this.hintText,
onChanged: onChanged ?? this.onChanged,
itemTextStyle: itemTextStyle ?? this.itemTextStyle,
headerTextStyle: headerTextStyle ?? this.headerTextStyle,
hintTextStyle: hintTextStyle ?? this.hintTextStyle,
itemSpecificStyles: itemSpecificStyles ?? this.itemSpecificStyles,
closedFillColor: closedFillColor ?? this.closedFillColor,
expandedFillColor: expandedFillColor ?? this.expandedFillColor,
closedBorder: closedBorder ?? this.closedBorder,
expandedBorder: expandedBorder ?? this.expandedBorder,
closedBorderRadius: closedBorderRadius ?? this.closedBorderRadius,
expandedBorderRadius: expandedBorderRadius ?? this.expandedBorderRadius,
closedHeaderPadding: closedHeaderPadding ?? this.closedHeaderPadding,
expandedHeaderPadding:
expandedHeaderPadding ?? this.expandedHeaderPadding,
itemsListPadding: itemsListPadding ?? this.itemsListPadding,
listItemPadding: listItemPadding ?? this.listItemPadding,
itemsScrollController:
itemsScrollController ?? this.itemsScrollController,
excludeSelected: excludeSelected ?? this.excludeSelected,
canCloseOutsideBounds:
canCloseOutsideBounds ?? this.canCloseOutsideBounds,
enabled: enabled ?? this.enabled,
alignment: alignment ?? this.alignment,
maxLines: maxLines ?? this.maxLines,
suffixIcon: suffixIcon ?? this.suffixIcon,
prefixIcon: prefixIcon ?? this.prefixIcon,
validator: validator ?? this.validator,
validateOnChange: validateOnChange ?? this.validateOnChange,
decoration: decoration ?? this.decoration,
controller: controller ?? this.controller,
headerExpandedColor: headerExpandedColor,
selectedItemText: selectedItemText,
customItemsNamesDisplayed: customItemsNamesDisplayed,
useKeyboardNavigation:
useKeyboardNavigation ?? this.useKeyboardNavigation,
focusNode: focusNode ?? this.focusNode,
requestFocusOnInit: requestFocusOnInit ?? this.requestFocusOnInit,
);
}