ZwapSelect constructor

ZwapSelect({
  1. Key? key,
  2. required Map<String, String> values,
  3. required dynamic callBackFunction(
    1. String key,
    2. List<String>? allSelectedValues
    ),
  4. required String translateText(
    1. String key
    ),
  5. String? selected,
  6. String hintText = '',
  7. bool canAddItem = false,
  8. dynamic onAddItem(
    1. String newItem
    )?,
  9. bool canSearch = false,
  10. double? maxOverlayHeight,
  11. String? label,
  12. Future<Map<String, String>> fetchMoreData(
    1. String inputValue,
    2. int pageNumber
    )?,
  13. int initialPageNumber = 1,
  14. Duration betweenFetchDuration = const Duration(milliseconds: 800),
  15. Duration onEmptyResponseDuration = const Duration(seconds: 10),
  16. TextStyle? hintTextStyle,
  17. double borderRadius = 8,
  18. ZwapSelectSearchTypes searchType = ZwapSelectSearchTypes.dynamic,
  19. Duration? searchDelayDuration,
  20. ItemBuilder? itemBuilder,
  21. String? dynamicLabel,
  22. bool error = false,
  23. String? errorText,
  24. Color? backgroundColor,
  25. Color? borderColor,
})

Regular ZwapSelect

Implementation

ZwapSelect({
  Key? key,
  required this.values,
  required this.callBackFunction,
  required this.translateText,
  this.selected,
  this.hintText = '',
  this.canAddItem = false,
  this.onAddItem,
  this.canSearch = false,
  this.maxOverlayHeight,
  this.label,
  this.fetchMoreData,
  this.initialPageNumber = 1,
  this.betweenFetchDuration = const Duration(milliseconds: 800),
  this.onEmptyResponseDuration = const Duration(seconds: 10),
  this.hintTextStyle,
  this.borderRadius = 8,
  this.searchType = ZwapSelectSearchTypes.dynamic,
  this.searchDelayDuration,
  this.itemBuilder,
  this.dynamicLabel,
  this.error = false,
  this.errorText,
  this.backgroundColor,
  this.borderColor,
})  : this.selectedValues = [],
      this._type = _ZwapSelectTypes.regular,
      this.valuesByCategory = {},
      this._hasCategories = false,
      assert(values.isNotEmpty),
      super(key: key);