copyWith method

DropdownOption<T> copyWith({
  1. T? value,
  2. String? label,
  3. String? supportingText,
  4. Widget? icon,
  5. Widget? trailing,
  6. bool? enabled,
  7. bool? showDivider,
  8. String? group,
  9. Widget builder(
    1. BuildContext context,
    2. bool selected,
    3. bool focused
    )?,
})

Create a copy of this option with some fields replaced

Implementation

DropdownOption<T> copyWith({
  T? value,
  String? label,
  String? supportingText,
  Widget? icon,
  Widget? trailing,
  bool? enabled,
  bool? showDivider,
  String? group,
  Widget Function(BuildContext context, bool selected, bool focused)? builder,
}) {
  return DropdownOption<T>(
    value: value ?? this.value,
    label: label ?? this.label, // coverage:ignore-line
    supportingText: supportingText ?? this.supportingText,
    icon: icon ?? this.icon,
    trailing: trailing ?? this.trailing,
    enabled: enabled ?? this.enabled,
    showDivider: showDivider ?? this.showDivider,
    group: group ?? this.group,
    builder: builder ?? this.builder,
  );
}