processBrotherItemSelectStatus static method
Implementation
static void processBrotherItemSelectStatus(
TSelectionEntity selectionEntity) {
if (TSelectionFilterType.checkbox == selectionEntity.filterType) {
selectionEntity.isSelected = !selectionEntity.isSelected;
List<TSelectionEntity>? allBrothers = selectionEntity.parent?.children;
if (!isEmpty(allBrothers)) {
for (TSelectionEntity entity in allBrothers!) {
if (entity != selectionEntity) {
if (entity.filterType == TSelectionFilterType.radio) {
entity.isSelected = false;
}
if (entity.filterType == TSelectionFilterType.date) {
entity.isSelected = false;
entity.value = null;
}
}
}
}
}
if (TSelectionFilterType.radio == selectionEntity.filterType) {
selectionEntity.parent?.clearChildSelection();
selectionEntity.isSelected = true;
}
if (TSelectionFilterType.date == selectionEntity.filterType) {
selectionEntity.parent?.clearChildSelection();
/// 日期类型时在外部 Picker 点击确定时设置 选中状态
selectionEntity.isSelected = true;
}
}