AppDropdown<T> constructor

const AppDropdown<T>({
  1. Key? key,
  2. required List<DropdownMenuItem<T>>? items,
  3. required ValueChanged<T?>? onChanged,
  4. T? value,
  5. String? label,
  6. String? hint,
  7. Widget? prefixIcon,
  8. bool isLoading = false,
  9. FormFieldValidator<T>? validator,
  10. FormFieldSetter<T>? onSaved,
  11. TextFieldStyle fieldStyle = TextFieldStyle.outlined,
  12. LabelPosition labelPosition = LabelPosition.above,
  13. Color? backgroundColor,
  14. Color? borderColor,
  15. double? borderRadius,
  16. EdgeInsetsGeometry? contentPadding,
  17. bool enabled = true,
})

Implementation

const AppDropdown({
  super.key,
  required this.items,
  required this.onChanged,
  this.value,
  this.label,
  this.hint,
  this.prefixIcon,
  this.isLoading = false,
  this.validator,
  this.onSaved,
  this.fieldStyle = TextFieldStyle.outlined,
  this.labelPosition = LabelPosition.above,
  this.backgroundColor,
  this.borderColor,
  this.borderRadius,
  this.contentPadding,
  this.enabled = true,
});