HeartIterableE<E> extension
Extension methods that maintain types.
- on
-
- Iterable<
E>
- Iterable<
Methods
-
after(
Iterable< E> sublist, {int skip = 0}) → List<E> ? -
Available on Iterable<
Returns everything after a given sublist:E> , provided by the HeartIterableE extension1, 2, 3.after(1) returns2, 31, 2, 3.after(1, 2) returns31, 2, 3.after([]) returns1, 2, 3 -
backwards(
) → List< E> -
Available on Iterable<
Reverses and returns a List.E> , provided by the HeartIterableE extension -
before(
Iterable< E> sublist, {int skip = 0}) → List<E> ? -
Available on Iterable<
Returns everything before a given sublist:E> , provided by the HeartIterableE extension1, 2, 3, 3.before(3) returns1, 21, 2, 3, 3.before(3, 3) returns1, 21, 2, 3, 3.before(1) returns []1, 2, 3, 3.before([]) returns [] -
drop(
int n) → List< E> -
Available on Iterable<
Removes first n elements.E> , provided by the HeartIterableE extension -
dropWhile(
bool dropFunction(E sub)) → List< E> -
Available on Iterable<
Removes elements until criteria not met.E> , provided by the HeartIterableE extension -
elemIndices(
E element) → List< int> -
Available on Iterable<
Finds each index where element occurs.E> , provided by the HeartIterableE extension -
filter(
bool filterFunction(E element)) → List< E> -
Available on Iterable<
Removes elements that don't meet criteria.E> , provided by the HeartIterableE extension -
group(
) → List< List< E> > -
Available on Iterable<
Items are in the same sublist if they are equal to the one next to it.E> , provided by the HeartIterableE extension -
groupBy(
bool groupFunction(dynamic a, dynamic b)) → List< List< E> > -
Available on Iterable<
Items are in the same sublist if they meet the criteria that compares consecutive elements.E> , provided by the HeartIterableE extension -
head(
) → E? -
Available on Iterable<
Returns the first element.E> , provided by the HeartIterableE extension -
indices(
Iterable< E> sublist, {bool exclusive = false}) → List<int> -
Available on Iterable<
Finds each index where sublist occurs. Deprecated 'elemIndices' only searched for one element and not sublist.E> , provided by the HeartIterableE extension -
inits(
) → List< List< E> > -
Available on Iterable<
Returns a List of Lists by adding one element at a time, starting from the beginning.E> , provided by the HeartIterableE extension -
interleave(
Iterable< E> it) → List<E> -
Available on Iterable<
Combines elements by taking turns. First element in original iterable is the first element of the result.E> , provided by the HeartIterableE extension -
intersect(
Iterable< E> input) → List<E> -
Available on Iterable<
Keeps all values that are also in input String, using deepEquals.E> , provided by the HeartIterableE extension -
intersperse(
E element) → List< E> -
Available on Iterable<
Inserts an element in between each element.E> , provided by the HeartIterableE extension -
nub(
[Iterable< E> ? it]) → List<E> -
Available on Iterable<
Removes duplicates by using deepEquals.E> , provided by the HeartIterableE extension -
replace(
Iterable< E> from, [Iterable<E> to = const [], int? count]) → List<E> -
Available on Iterable<
Successor to 'replaceFirst' and 'replaceAll'E> , provided by the HeartIterableE extension1, 1, 1.replace(1,3) returns3, 3, 31, 1, 1, 1.replace(1, 1,3) returns3, 3 -
replaceAll(
E from, [dynamic to]) → List< E> -
Available on Iterable<
Similar to .replaceAll for Strings.E> , provided by the HeartIterableE extension -
replaceFirst(
E from, [dynamic to]) → List< E> -
Available on Iterable<
Similar to .replaceFirst for Strings.E> , provided by the HeartIterableE extension -
riffleIn(
) → List< E> -
Available on Iterable<
Splits into two and uses interleave to combine, second half first.E> , provided by the HeartIterableE extension -
riffleOut(
) → List< E> -
Available on Iterable<
Splits into two and uses interleave to combine.E> , provided by the HeartIterableE extension -
shuffled(
[Random? random]) → List< E> -
Available on Iterable<
Returns a shuffled List.E> , provided by the HeartIterableE extension -
splitAt(
int n) → List< List< E> > -
Available on Iterable<
Splits into two Lists after first n elements.E> , provided by the HeartIterableE extension -
startsWith(
Iterable< E> sublist) → bool -
Available on Iterable<
Equivalent to Dart's .startsWith for StringE> , provided by the HeartIterableE extension1, 2, 3.startsWith(1) returns true1, 2, 3.startsWith(1, 2) returns true1, 2, 3.startsWith(3) returns false -
subtract(
Iterable< E> sublist) → List<E> -
Available on Iterable<
Removes elements one at a time, using deepEquals.E> , provided by the HeartIterableE extension -
subtractAll(
Iterable< E> sublist) → List<E> -
Available on Iterable<
Removes all elements if they are inE> , provided by the HeartIterableE extensionsublist. -
tail(
) → List< E> ? -
Available on Iterable<
Removes the first element, keeps the "tail".E> , provided by the HeartIterableE extension -
tails(
) → List< List< E> > -
Available on Iterable<
Returns a List of Lists by removing one element at a time, starting from the beginning.E> , provided by the HeartIterableE extension -
toStringList(
) → List< String> -
Available on Iterable<
Converts all elements to Strings.E> , provided by the HeartIterableE extension -
union(
Iterable< E> l) → List<E> -
Available on Iterable<
Adds elements from input that aren't in original value.E> , provided by the HeartIterableE extension
Operators
-
operator *(
int n) → List< E> -
Available on Iterable<
Repeat elements n times.E> , provided by the HeartIterableE extension