Split<E> class
A namespace for functions that split an Iterable's elements.
To access Split, call the SplittableIterable.split extension getter on an iterable.
Example
[1, 2, 3, 4].split.by(size: 2); // [ [1, 2], [3, 4], [5] ]
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
after(
Predicate< E> predicate) → Iterable<List< E> > -
Splits this iterable's elements into lists after those that satisfy
predicate
. -
before(
Predicate< E> predicate) → Iterable<List< E> > -
Splits this iterable's elements into lists before those that satisfy
predicate
. -
by(
{required int size}) → Iterable< List< E> > -
Splits this iterable into lists of the given
size
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
window(
{required int size, int by = 1, bool partial = false}) → Iterable< List< E> > - Split this iterable using a sliding window.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited