NullableIterableExtensions<T> extension
- on
-
- Iterable<
T> ?
- Iterable<
Properties
- firstOrNull → T?
-
Returns the first element.
no setter
- isEmpty → bool
-
Whether this collection has no elements.
no setter
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setter
- lastOrNull → T?
-
Returns the last element.
no setter
- length → int
-
Returns the number of elements in Iterable.
no setter
Methods
-
contains(
Object? element) → bool -
Whether the collection contains an element equal to
element
. -
containsAll(
Iterable< Object?> elements) → bool -
Returns
true
if Iterable contains allelements
. -
containsAny(
Iterable< Object?> elements) → bool -
Returns
true
if Iterable contains any ofelements
. -
equalsTo(
Iterable< T> ? others) → bool -
Returns
true
if the internals of Iterable andothers
are compared and match. -
fill(
int length, T generator(int index)) → Iterable< T> -
If
length
is greater than the current number, returns Iterable filled with elements generated bygenerator
. -
firstWhereOrNull(
bool test(T item)) → T? -
Returns the first element for which the return value of
test
istrue
.