dropdownMaxHeight property
double
get
dropdownMaxHeight
Implementation
double get dropdownMaxHeight {
double height = 0;
int dataLength =
(searchResults.isNotEmpty || searchTextController.text.isNotEmpty
? searchResults.length
: initData.length);
if (dataLength < 5) {
height = dataLength * 40;
} else {
height = selectorMaxHeight ?? 200;
}
return height > 0 ? height : 40;
}