Dropinity<FullResponse, Model>.withApiRequest constructor

const Dropinity<FullResponse, Model>.withApiRequest({
  1. Key? key,
  2. bool enableMultiSelection = false,
  3. Widget multiSelectionItemBuilder(
    1. BuildContext context,
    2. Model element
    )?,
  4. FutureOr<void> onListChanged(
    1. List<Model> values
    )?,
  5. List<Model> initialValues = const [],
  6. bool maintainState = false,
  7. bool showNoDataAlert = false,
  8. String? validator(
    1. Model?
    )?,
  9. AutovalidateMode? autoValidateMode,
  10. Widget errorWidget(
    1. String errorMsg
    )?,
  11. Curve curve = Curves.linear,
  12. Color listBackgroundColor = Colors.white,
  13. Widget? dropdownTitle,
  14. TextFieldData<Model>? textFieldData,
  15. double? listHeight,
  16. required DropinityController controller,
  17. required ButtonData<Model> buttonData,
  18. required DropinityPagifyData<FullResponse, Model>? pagifyData,
  19. required FutureOr<void> onChanged(
    1. Model val
    ),
  20. FutureOr<void> onCollapse()?,
  21. FutureOr<void> onExpand()?,
})

constructor for api dropdown

Implementation

const Dropinity.withApiRequest({
  super.key,
  this.enableMultiSelection = false,
  this.multiSelectionItemBuilder,
  this.onListChanged,
  this.initialValues = const [],

  this.maintainState = false,
  this.showNoDataAlert = false,
  this.validator,
  this.autoValidateMode,
  this.errorWidget,
  this.curve = Curves.linear,
  this.listBackgroundColor = Colors.white,
  this.dropdownTitle,
  this.textFieldData,
  this.listHeight,
  required this.controller,
  required this.buttonData,
  required this.pagifyData,
  required this.onChanged,
  this.onCollapse,
  this.onExpand,
}) : values = null,
      valuesData = null,
      _dropdownType = DropdownType.withRequest;