expandAndRemoveEmpty<TCast> method
Each element of the list is converted to TCast
data using callback
.
The return value of callback
can be Iterable or List, all of which will be each element of the list.
If the element inside the return value of callback
is Null, it is removed from the element.
It is returned as a List type, not as a Iterable type like expand.
リストの各要素をcallback
を用いTCast
のデータに変換します。
callback
の戻り値はIterableやListを指定でき、その全要素がリストの各要素となります。
callback
の戻り値内部の要素がNullの場合、要素から削除されます。
Implementation
List<TCast> expandAndRemoveEmpty<TCast>(
Iterable<TCast?> Function(T item) callback,
) {
return expand<TCast?>(callback).removeEmpty();
}