nonNullItems property
Future<List<DropDownItemState<T> > >
get
nonNullItems
Implementation
Future<List<DropDownItemState<T>>> get nonNullItems async {
// Wait for the items to be resolved
final resolvedItems = await this.resolvedItems;
// Filter out null values and map them to DropDownItemState
return resolvedItems
.where((item) => item.value != null)
.map((item) => DropDownItemState<T>(
item.value as T,
label: item.label,
))
.toList();
}