fix example

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-04-20 21:17:43 +05:30
parent 3bb1b11ee8
commit 4e9f4baf23
5 changed files with 54 additions and 49 deletions
@@ -0,0 +1,9 @@
/// Useful extension functions for [Iterable]
extension IterableX<T> on Iterable<T?> {
/// Removes all the null values
/// and converts `Iterable<T?>` into `Iterable<T>`
Iterable<T> get withNullifyer => [
for (final item in this)
if (item != null) item
];
}