simple static method

AtomicDropdown<String> simple({
  1. required List<String> options,
  2. required ValueChanged<String?> onChanged,
  3. String? value,
  4. String? label,
  5. String? hint,
  6. String? helperText,
  7. String? errorText,
  8. bool enabled = true,
})

Implementation

static AtomicDropdown<String> simple({
  required List<String> options,
  required ValueChanged<String?> onChanged,
  String? value,
  String? label,
  String? hint,
  String? helperText,
  String? errorText,
  bool enabled = true,
}) {
  return AtomicDropdown<String>(
    items: options.map((option) => AtomicDropdownItem(
      value: option,
      label: option,
    )).toList(),
    value: value,
    onChanged: onChanged,
    label: label,
    hint: hint,
    helperText: helperText,
    errorText: errorText,
    enabled: enabled,
  );
}