copyWith method

DropdownItem<T> copyWith({
  1. Widget? child,
  2. double? height,
  3. bool? intrinsicHeight,
  4. void onTap()?,
  5. T? value,
  6. bool? enabled,
  7. AlignmentGeometry? alignment,
  8. bool? closeOnTap,
})

Creates a copy of this DropdownItem but with the given fields replaced with the new values.

Implementation

DropdownItem<T> copyWith({
  Widget? child,
  double? height,
  bool? intrinsicHeight,
  void Function()? onTap,
  T? value,
  bool? enabled,
  AlignmentGeometry? alignment,
  bool? closeOnTap,
}) {
  return DropdownItem<T>(
    height: height ?? this.height,
    intrinsicHeight: intrinsicHeight ?? this.intrinsicHeight,
    onTap: onTap ?? this.onTap,
    value: value ?? this.value,
    enabled: enabled ?? this.enabled,
    alignment: alignment ?? this.alignment,
    closeOnTap: closeOnTap ?? this.closeOnTap,
    child: child ?? this.child,
  );
}