getFilledCustomInputItem static method
判断列表中是否有range类型
Implementation
static SelectionEntity? getFilledCustomInputItem(List<SelectionEntity> list) {
SelectionEntity? filledCustomInputItem;
for (SelectionEntity entity in list) {
if (entity.isSelected &&
(SelectionFilterType.range == entity.filterType ||
SelectionFilterType.dateRange == entity.filterType ||
SelectionFilterType.dateRangeCalendar == entity.filterType) &&
entity.customMap != null) {
filledCustomInputItem = entity;
break;
}
if (entity.children.isNotEmpty) {
filledCustomInputItem = getFilledCustomInputItem(entity.children);
}
if (filledCustomInputItem != null) {
break;
}
}
return filledCustomInputItem;
}