eachItemsInListAsLiveData<T> function
void Function(LiveData<List<T> > liveData)
eachItemsInListAsLiveData<T>({
- void then(
- LiveData<
T> item
- LiveData<
Implementation
void Function(LiveData<List<T>> liveData) eachItemsInListAsLiveData<T>({
void Function(LiveData<T> item)? then,
}) {
return (LiveData<List<T>> liveData) {
int i = 0;
for (var element in liveData.value) {
LiveData<T> lv = attach(
liveData,
element,
name: '${liveData.name ?? ''}[$i]',
);
then?.call(lv);
i++;
}
};
}