copyWith method

SDropdown copyWith({
  1. double? width,
  2. double? height,
  3. double? overlayHeight,
  4. double? overlayWidth,
  5. double? scale,
  6. List<String>? items,
  7. String? selectedItem,
  8. String? initialItem,
  9. String? hintText,
  10. dynamic onChanged(
    1. String?
    )?,
  11. TextStyle? itemTextStyle,
  12. TextStyle? headerTextStyle,
  13. TextStyle? hintTextStyle,
  14. Map<String, TextStyle>? itemSpecificStyles,
  15. Color? closedFillColor,
  16. Color? expandedFillColor,
  17. Border? closedBorder,
  18. Border? expandedBorder,
  19. BorderRadius? closedBorderRadius,
  20. BorderRadius? expandedBorderRadius,
  21. EdgeInsets? closedHeaderPadding,
  22. EdgeInsets? expandedHeaderPadding,
  23. EdgeInsets? itemsListPadding,
  24. EdgeInsets? listItemPadding,
  25. ScrollController? itemsScrollController,
  26. bool? excludeSelected,
  27. bool? canCloseOutsideBounds,
  28. bool? enabled,
  29. AlignmentGeometry? alignment,
  30. int? maxLines,
  31. Widget? suffixIcon,
  32. Widget? prefixIcon,
  33. String? validator(
    1. String?
    )?,
  34. bool? validateOnChange,
  35. SDropdownDecoration? decoration,
  36. SDropdownController? controller,
  37. bool? useKeyboardNavigation,
  38. FocusNode? focusNode,
  39. 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,
  );
}