ZwapSelect constructor
ZwapSelect({
- Key? key,
- required Map<
String, String> values, - required dynamic callBackFunction(),
- required String translateText(
- String key
- String? selected,
- String hintText = '',
- bool canAddItem = false,
- dynamic onAddItem(
- String newItem
- bool canSearch = false,
- double? maxOverlayHeight,
- String? label,
- Future<
Map< fetchMoreData()?,String, String> > - int initialPageNumber = 1,
- Duration betweenFetchDuration = const Duration(milliseconds: 800),
- Duration onEmptyResponseDuration = const Duration(seconds: 10),
- TextStyle? hintTextStyle,
- double borderRadius = 8,
- ZwapSelectSearchTypes searchType = ZwapSelectSearchTypes.dynamic,
- Duration? searchDelayDuration,
- ItemBuilder? itemBuilder,
- String? dynamicLabel,
- bool error = false,
- String? errorText,
- Color? backgroundColor,
- 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);