getList method
get list based on inactive or active user
Implementation
List<UFUSingleSelectModel> getList() {
if (widget.showIncludeInactiveButton &&
list.any(
(element) =>
!(element.active ?? true) && widget.selectedItemId == element.id,
)) {
includeInactive = true;
}
if (includeInactive) {
return list;
} else {
return list.where((element) => element.active ?? true).toList();
}
}