SearchItemPicker<T> constructor

SearchItemPicker<T>({
  1. Key? key,
  2. required List<ListItem<T>> items,
  3. required ValueChanged<T> onChanged,
  4. required String hint,
  5. T? initialValue,
  6. Widget? disabledHint,
  7. Widget? prefixIcon,
  8. Widget? suffixIcon,
  9. InputBorder? border,
  10. double elevation = 0,
  11. double borderRadius = 0,
  12. Color color = Colors.white,
})

Implementation

SearchItemPicker({
  super.key,
  required this.items,
  required this.onChanged,
  required this.hint,
  this.initialValue,
  this.disabledHint,
  this.prefixIcon,
  this.suffixIcon,
  this.border,
  this.elevation = 0,
  this.borderRadius = 0,
  this.color = Colors.white,
})  : assert(items.isEmpty ||
          initialValue == null ||
          items
                  .where((ListItem<T> item) => item.value == initialValue)
                  .length ==
              1);