CustomDropdownSingleDynamicAPI constructor

const CustomDropdownSingleDynamicAPI({
  1. Key? key,
  2. double? width,
  3. bool isEnabled = true,
  4. bool isAddNewButton = false,
  5. void onAddNewPressed()?,
  6. required Future<List<DropDownResponse>> dynamicAPIs,
  7. required void onChanged(
    1. DropDownResponse? selectedItem
    ),
  8. DropDownResponse? selectedItem,
  9. String hintText = 'Select Item',
  10. bool isValidator = false,
})

Implementation

const CustomDropdownSingleDynamicAPI(
    {super.key,
    this.width,
    this.isEnabled = true,
    this.isAddNewButton = false,
    this.onAddNewPressed,
    required this.dynamicAPIs,
    required this.onChanged,
    this.selectedItem,
    this.hintText = 'Select Item',
    this.isValidator = false})
    : assert(
        !(isAddNewButton && onAddNewPressed == null),
        'onAddNewPressed must be provided when isAddNewButton is true',
      );