ListSetView<T> class
- Implemented types
-
- ListSet<
T>
- ListSet<
- Available extensions
- ElementalOnIterable
- ElementalOnIterableOfIterable
- EnumByName
- FicIterableExtension
- FicIterableExtensionTypeNullable
- FicIterableOfMapEntryExtension
- FicListExtension
- FicListExtensionNullable
- FicSetExtension
- FICZipExtension
- FutureIterable
- IterableExtensions
- ListToJSArray
- NullableIterableExtensions
- ZIOIterableExt
Constructors
-
ListSetView(Set<
T> _set) - ListSetView.fromJson(dynamic json, T fromJsonT(Object?))
-
Converts from JSon. Json serialization support for json_serializable with @JsonSerializable.
factory
Properties
-
asComparableEntries
→ Iterable<
Entry< K, V> > -
Available on Iterable<
MapEntry is not Comparable. If you need to compare two iterables of MapEntry you can do this:MapEntry< , provided by the FicIterableOfMapEntryExtension extensionK, V> >no setter -
collect
→ ZIO<
R, E, IList< A> > -
Available on Iterable<
Alias for ZIO.collectIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
collectDiscard
→ ZIO<
R, E, Unit> -
Available on Iterable<
Alias for ZIO.collectDiscardIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
collectPar
→ ZIO<
R, E, IList< A> > -
Available on Iterable<
Alias for ZIO.collectParIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
collectParDiscard
→ ZIO<
R, E, Unit> -
Available on Iterable<
Alias for ZIO.collectParDiscardIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter - first ↔ T
-
The first element.
getter/setter pairoverride
-
firstOption
→ Option<
T> -
Available on Iterable<
Get the first element of the Iterable. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter - firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter -
flatten
→ Iterable<
T> -
Available on Iterable<
From aIterable< , provided by the ElementalOnIterableOfIterable extensionT> >Iterable<Iterable<T>>return aIterable<T>of their concatenation.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
head
→ Option<
T> -
Available on Iterable<
Get the first element of the Iterable. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter -
indexed
→ Iterable<
(int, T)> -
Available on Iterable<
Pairs of elements of the indices and elements of this iterable.T> , provided by the IterableExtensions extensionno setter -
init
→ Option<
Iterable< T> > -
Available on Iterable<
Return all the elements of a Iterable except the last one. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter - isEmpty → bool
-
Whether this collection has no elements.
no setteroverride
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setteroverride
-
iterator
→ Iterator<
T> -
An iterator that iterates over the elements of this set.
no setteroverride
- last ↔ T
-
The last element.
getter/setter pairoverride
-
lastOption
→ Option<
T> -
Available on Iterable<
Get the last element of the Iterable. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter - lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnullif the iterable is empty.no setter - length ↔ int
-
The number of elements in this Iterable.
getter/setter pairoverride
-
lock
→ IList<
T> -
Available on List<
Locks the list, returning an immutable list (IList).T> , provided by the FicListExtension extensionno setter -
lock
→ ISet<
T> -
Available on Set<
Locks the set, returning an immutable set (ISet).T> , provided by the FicSetExtension extensionno setter -
lockUnsafe
→ IList<
T> -
Available on List<
Locks the list, returning an immutable list (IList).T> , provided by the FicListExtension extensionno setter -
lockUnsafe
→ ISet<
T> -
Available on Set<
Locks the set, returning an immutable set (ISet).T> , provided by the FicSetExtension extensionno setter -
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnullelements of this iterable.no setter -
raceAll
→ ZIO<
R, E, A> -
Available on Iterable<
Alias for ZIO.raceAllIZIO< , provided by the ZIOIterableExt extensionR, E, A> >no setter -
reversed
→ Iterable<
T> -
An Iterable of the objects in this list in reverse order.
no setteroverride
-
reversedView
→ List<
T> -
Available on List<
Returns a List of the objects in this list in reverse order. Very efficient since it returns a view (which means, if you change the original list this one will also change, and vice-versa).T> , provided by the FicListExtension extensionno setter -
reversedView
→ ListSet<
T> -
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → T
-
Checks that this iterable has only one element, and returns that element.
no setteroverride
- singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull.no setter -
tail
→ Option<
Iterable< T> > -
Available on Iterable<
Return all the elements of a Iterable except the first one. If the Iterable is empty, return None.T> , provided by the ElementalOnIterable extensionno setter -
toJS
→ JSArray<
T> -
Available on List<
Converts this List to a JSArray by either casting, unwrapping, or cloning the List.T> , provided by the ListToJSArray extensionno setter -
toJSProxyOrRef
→ JSArray<
T> -
Available on List<
Converts this List to a JSArray by either casting, unwrapping, or proxying the List.T> , provided by the ListToJSArray extensionno setter -
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter
Methods
-
add(
T value) → bool -
Adds
valueto the set.override -
addAll(
Iterable< T> elements) → void -
Adds all
elementsto this set.override -
addBetween(
T separator) → List< T> -
Available on List<
Return a new list, adding a separator between the original list items (but not before the first and after the last).T> , provided by the FicListExtension extension -
all(
bool test(T t)) → bool -
Available on Iterable<
Checks whether every element of this Iterable satisfiesT> , provided by the ElementalOnIterable extensiontest. -
any(
Predicate< T> test) → bool -
Checks whether any element of this iterable satisfies
test.override -
anyIs(
T value) → bool -
Available on Iterable<
ReturnsT> , provided by the FicIterableExtension extensiontrueif any item is equal tovalue. -
ap<
B> (Iterable< B Function(T)> iterable) → Iterable<B> -
Available on Iterable<
Apply all the functions insideT> , provided by the ElementalOnIterable extensioniterableto this Iterable. -
append(
T element) → Iterable< T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelementat the end of the Iterable. -
asList(
) → List< T> -
Available on Iterable<
Returns a List containing the elements of this iterable. If the Iterable is already a List, return the same instance (nothing new is created). Otherwise, create a new List from it. See also: Dart's native toList, which always creates a new list.T> , provided by the FicIterableExtension extension -
asMap(
) → Map< int, T> -
An unmodifiable Map view of this list.
override
-
asNameMap(
) → Map< String, T> -
Available on Iterable<
Creates a map from the names of enum values to the values.T> , provided by the EnumByName extension -
asSet(
) → Set< T> -
Available on Iterable<
Creates a Set containing the same elements as this iterable. If the Iterable is already a Set, return the same instance (nothing new is created). Otherwise, create a new Set from it. See also: Dart's native toSet, which always creates a new set.T> , provided by the FicIterableExtension extension -
averageBy<
N extends num> (N mapper(T element)) → double -
Available on Iterable<
The arithmetic mean of the elements of a non-empty iterable. The arithmetic mean is the sum of the elements divided by the number of elements. If iterable is empty it returns 0. Examples:T> , provided by the FicIterableExtension extension -
breakI(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is longest prefix (possibly empty) of this Iterable with elements that do not satisfyT> , provided by the ElementalOnIterable extensiontestand second element is the remainder of the Iterable. -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname. -
cast<
R> () → ListSetView< R> -
Returns a list-set of
Rinstances. If this list-set contains instances which cannot be cast toR, it will throw an error.override -
clear(
) → void -
Removes all elements from the set.
override
-
compareAsSets(
List other) → bool -
Available on List<
ReturnT> , provided by the FicListExtension extensiontrueif the lists contain the same items (in any order). Ignores repeated items. -
concat(
Iterable< T> other) → Iterable<T> -
Available on Iterable<
Creates the lazy concatenation of this Iterable andT> , provided by the ElementalOnIterable extensionother. -
concat(
List< T> ? list2, [List<T> ? list3, List<T> ? list4, List<T> ? list5]) → List<T> -
Available on List<
Return an efficient concatenation of up to 5 lists:T> , provided by the FicListExtension extension -
contains(
covariant T? value) → bool -
Whether
valueis in the set.override -
containsAll(
covariant Iterable< T?> other) → bool -
Whether this set contains all the elements of
other.override -
deepEquals(
Iterable? other, {bool ignoreOrder = false}) → bool -
Available on Iterable<
Compare all items, in order or not, according toT> , provided by the FicIterableExtension extensionignoreOrder, using operator ==. Return true if they are all the same, in the same order. -
deepEqualsByIdentity(
Iterable? other, {bool ignoreOrder = false}) → bool -
Available on Iterable<
Return true if they are all the same, in the same order. Compare all items, in order or not, according toT> , provided by the FicIterableExtension extensionignoreOrder, using identical. Return true if they are all the same, in the same order. -
delete(
T element) → Iterable< T> -
Available on Iterable<
Remove the first occurrence ofT> , provided by the ElementalOnIterable extensionelementfrom this Iterable. -
diffAndIntersect<
G> (Set< G> other, {bool diffThisMinusOther = true, bool diffOtherMinusThis = true, bool intersectThisWithOther = true, bool intersectOtherWithThis = true}) → DiffAndIntersectResult<T, G> -
Available on Set<
Given this set andT> , provided by the FicSetExtension extensionother, returns: -
difference(
covariant Set< Object?> other) → Set<T> -
Creates a new set with the elements of this that are not in
other.override -
distinct(
{dynamic by(T item)?}) → List< T> -
Available on List<
Returns a new list, which is equal to the original one, but without duplicates. In other words, the new list has only distinct items. Optionally, you can provide anT> , provided by the FicListExtension extensionidfunction to compare the items. -
divideList(
Predicate< T> test) → List<List< T> > -
Available on List<
Search a list for items that satisfy aT> , provided by the FicListExtension extensiontestpredicate (matching items), and then divide that list into parts, such as each part contains one matching item. Except maybe for the first matching item, it will keep the matching items as the first item in each part. -
divideListAsMap<
G> (bool test(T item), {G key(T item)?, bool includeFirstItems = false}) → Map< G, List< T> > -
Available on List<
Search a list for items that satisfy aT> , provided by the FicListExtension extensiontestpredicate (matching items), and then divide that list into a Map of parts, such as each part contains one matching item, and the keys are given by thekeyfunction. -
drop(
int n) → Iterable< T> -
Available on Iterable<
Return the suffix of this Iterable after the firstT> , provided by the ElementalOnIterable extensionnelements. -
dropRight(
[int count = 1]) → Iterable< T> -
Available on Iterable<
Drops the lastT> , provided by the ElementalOnIterable extensioncountelement of this iterable. -
dropWhileLeft(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Remove all elements starting from the first as long asT> , provided by the ElementalOnIterable extensiontestreturnstrue. -
elem(
T element) → bool -
Available on Iterable<
Check ifT> , provided by the ElementalOnIterable extensionelementis contained inside this Iterable. -
elementAt(
int index) → T -
Returns the
indexth element.override -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindexof this iterable, ornull. -
every(
Predicate< T> test) → bool -
Checks whether every element of this iterable satisfies
test.override -
everyIs(
T value) → bool -
Available on Iterable<
ReturnsT> , provided by the FicIterableExtension extensiontrueif all items are equal tovalue. -
expand<
E> (Iterable< E> f(T element)) → Iterable<E> -
Expands each element of this Iterable into zero or more elements.
override
-
fillRange(
int start, int end, [T? fillValue]) → void -
Overwrites a range of elements with
fillValue.override -
filter(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Returns the list of those elements that satisfyT> , provided by the ElementalOnIterable extensiontest. -
filterWithIndex(
bool test(T t, int index)) → Iterable< T> -
Available on Iterable<
Returns the list of those elements that satisfyT> , provided by the ElementalOnIterable extensiontest. -
findDuplicates(
) → Set< T> -
Available on Iterable<
Finds duplicates and then returns a Set with the duplicated elements. If there are no duplicates, an empty Set is returned.T> , provided by the FicIterableExtension extension -
firstWhere(
Predicate< T> test, {T orElse()?}) → T -
The first element that satisfies the given predicate
test.override -
flatMap<
B> (Iterable< B> toElements(T t)) → Iterable<B> -
Available on Iterable<
For each element of the Iterable apply functionT> , provided by the ElementalOnIterable extensiontoElementsand flat the result. -
flatMapWithIndex<
B> (Iterable< B> toElements(T t, int index)) → Iterable<B> -
Available on Iterable<
Same asT> , provided by the ElementalOnIterable extensionflatMap(extend) but provides also theindexof each mapped element in the mapping function (toElements). -
fold<
E> (E initialValue, E combine(E previousValue, T element)) → E -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
override
-
foldLeft<
B> (B initialValue, B combine(B b, T t)) → B -
Available on Iterable<
Fold this Iterable into a single value by aggregating each element of the list from the first to the last.T> , provided by the ElementalOnIterable extension -
foldLeftWithIndex<
B> (B initialValue, B combine(B previousValue, T element, int index)) → B -
Available on Iterable<
Same asT> , provided by the ElementalOnIterable extensionfoldLeft(fold) but provides also theindexof each mapped element in thecombinefunction. -
followedBy(
Iterable< T> other) → Iterable<T> -
Creates the lazy concatenation of this iterable and
other.override -
forEach(
void f(T element)) → void -
Invokes
actionon each element of this iterable in iteration order.override -
get(
int index, {T orElse(int index)?}) → T -
Available on List<
Returns theT> , provided by the FicListExtension extensionindexth element. If that index doesn't exist (negative, or out of range), will return the result of callingorElse. In this case, iforElseis not provided, will throw an error. -
getAndMap(
int index, T map(int index, bool inRange, T? value)) → T -
Available on List<
Gets theT> , provided by the FicListExtension extensionindexth element, and then apply themapfunction to it, returning the result. If that index doesn't exist (negative, or out of range), will themapmethod will be called withinRangefalse andvaluenull. -
getOrNull(
int index) → T? -
Available on List<
Returns theT> , provided by the FicListExtension extensionindexth element. If that index doesn't exist (negative or out of range), will return null. This method will never throw an error. -
getRange(
int start, int end) → Iterable< T> -
Creates an Iterable that iterates over a range of elements.
override
-
indexOf(
T element, [int start = 0]) → int -
The first index of
elementin this list.override -
indexWhere(
Predicate< T> test, [int start = 0]) → int -
The first index in the list that satisfies the provided
test.override -
insert(
int index, T element) → void -
Inserts
elementat positionindexin this list.override -
insertAll(
int index, Iterable< T> iterable) → void -
Inserts all objects of
iterableat positionindexin this list.override -
insertBy(
Order< T> order, T element) → Iterable<T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelementinto the list at the first position where it is less than or equal to the next element based onorder(Order). -
insertWith<
A> (A extract(T instance), Order< A> order, T element) → Iterable<T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelementinto the Iterable at the first position where it is less than or equal to the next element based onorder(Order). -
intersect(
Iterable< T> iterable) → Iterable<T> -
Available on Iterable<
Return the intersection of two Iterable (all the elements that both Iterable have in common).T> , provided by the ElementalOnIterable extension -
intersection(
covariant Set< Object?> other) → Set<T> -
Creates a new set which is the intersection between this set and
other.override -
intersectsWith(
Iterable< T> other) → bool -
Available on Iterable<
Returns true if this Iterable has any items in common with theT> , provided by the FicIterableExtension extensionotherIterable. This method is as performant as possible, but it will be faster if any of the Iterables is a Set or an ISet. -
intersperse(
T middle) → Iterable< T> -
Available on Iterable<
Return an Iterable placing anT> , provided by the ElementalOnIterable extensionmiddlein between elements of the this Iterable. -
isFirst(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis the same (by identity) as the first iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you have the first item. For example: -
isLast(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis the same (by identity) as the last iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you have the last item. For example: -
isNotFirst(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis NOT the same (by identity) as the first iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you don't have the first item. For example: -
isNotLast(
T item) → bool -
Available on Iterable<
Return true if the givenT> , provided by the FicIterableExtension extensionitemis NOT the same (by identity) as the last iterable item. If this iterable is empty, always return null. This is useful for non-indexed loops where you need to know when you don't have the last item. For example: -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings.
override
-
lastIndexOf(
T element, [int? start]) → int -
The last index of
elementin this list.override -
lastIndexWhere(
Predicate< T> test, [int? start]) → int -
The last index in the list that satisfies the provided
test.override -
lastWhere(
Predicate< T> test, {T orElse()?}) → T -
The last element that satisfies the given predicate
test.override -
lookup(
Object? object) → T? -
If an object equal to
objectis in the set, return it.override -
map<
E> (E f(T e)) → Iterable< E> -
The current elements of this iterable modified by
toElement.override -
mapIndexedAndLast<
R> (R convert(int index, T item, bool isLast)) → Iterable< R> -
Available on Iterable<
Maps each element and its index to a new value. This is similar toT> , provided by the FicIterableExtension extensionmapIndexedbut also tells you which item is the last. -
mapNotNull<
E> (E? f(T? e)) → Iterable< E> -
Available on Iterable<
Similar to map, but MAY return a non-nullable type.T?> , provided by the FicIterableExtensionTypeNullable extension -
mapWithIndex<
B> (B toElement(T t, int index)) → Iterable< B> -
Available on Iterable<
Same asT> , provided by the ElementalOnIterable extensionmapbut provides also theindexof each mapped element in the mapping function (toElement). -
maximumBy(
Order< T> order) → Option<T> -
Available on Iterable<
The largest element of this Iterable based onT> , provided by the ElementalOnIterable extensionorder. -
minimumBy(
Order< T> order) → Option<T> -
Available on Iterable<
The least element of this Iterable based onT> , provided by the ElementalOnIterable extensionorder. -
moveToTheEnd(
T item) → void -
Available on List<
Moves the first occurrence of theT> , provided by the FicListExtension extensionitemto the end of the list. -
moveToTheFront(
T item) → void -
Available on List<
Moves the first occurrence of theT> , provided by the FicListExtension extensionitemto the start of the list. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notElem(
T element) → bool -
Available on Iterable<
Check ifT> , provided by the ElementalOnIterable extensionelementis not contained inside this Iterable. -
partition(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record containing the values of this Iterable for whichT> , provided by the ElementalOnIterable extensiontestisfalsein the first element, and the values for which it istruein the second element. -
prepend(
T element) → Iterable< T> -
Available on Iterable<
InsertT> , provided by the ElementalOnIterable extensionelementat the beginning of the Iterable. -
prependAll(
Iterable< T> other) → Iterable<T> -
Available on Iterable<
Insert all the elements insideT> , provided by the ElementalOnIterable extensionotherat the beginning of the Iterable. -
reduce(
T combine(T value, T element)) → T -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
override
-
remove(
Object? value) → bool -
Removes
valuefrom the set.override -
removeAll(
Iterable< Object?> elements) → void -
Removes each element of
elementsfrom this set.override -
removeAt(
int index) → T -
Removes the object at position
indexfrom this list.override -
removeDuplicates(
{dynamic by(T item)?, bool removeNulls = false}) → void -
Available on List<
Removes all duplicates from the list, leaving only the distinct items. Optionally, you can provide anT> , provided by the FicListExtension extensionidfunction to compare the items. -
removeLast(
) → T -
Removes and returns the last object in this list.
override
-
removeNulls(
) → void -
Available on List<
Removes allT> , provided by the FicListExtension extensionnulls from the List. -
removeNulls(
) → void -
Available on Set<
Removes allT> , provided by the FicSetExtension extensionnulls from the Set. -
removeRange(
int start, int end) → void -
Removes a range of elements from the list.
override
-
removeWhere(
Predicate< T> test) → void -
Removes all elements of this set that satisfy
test.override -
replaceRange(
int start, int end, Iterable< T> replacement) → void -
Replaces a range of elements with the elements of
replacements.override -
restrict(
T? item, {required T orElse}) → T -
Available on Iterable<
Restricts some item to one of those present in this iterable.T> , provided by the FicIterableExtension extension -
retainAll(
Iterable< Object?> elements) → void -
Removes all elements of this set that are not elements in
elements.override -
retainWhere(
Predicate< T> test) → void -
Removes all elements of this set that fail to satisfy
test.override -
setAll(
int index, Iterable< T> iterable) → void -
Overwrites elements with the objects of
iterable.override -
setRange(
int start, int end, Iterable< T> iterable, [int skipCount = 0]) → void -
Writes some elements of
iterableinto a range of this list.override -
shuffle(
[Random? random]) → void -
Shuffles the elements of this list randomly.
override
-
singleWhere(
Predicate< T> test, {T orElse()?}) → T -
The single element that satisfies
test.override -
skip(
int count) → Iterable< T> -
Creates an Iterable that provides all but the first
countelements.override -
skipWhile(
bool test(T value)) → Iterable< T> -
Creates an
Iterablethat skips leading elements whiletestis satisfied.override -
sort(
[int compare(T a, T b)?]) → void -
Sorts this list according to the order specified by the
comparefunction.override -
sortBy(
Order< T> order) → List<T> -
Available on Iterable<
Sort this List based onT> , provided by the ElementalOnIterable extensionorder(Order). -
sortedLike(
Iterable ordering) → List< T> -
Available on Iterable<
Returns a list, sorted according to the order specified by theT> , provided by the FicIterableExtension extensionorderingiterable. Items which don't appear inorderingwill be included in the end, in their original order. Items oforderingwhich are not found in the original list are ignored. -
sortedReversed(
[Comparator< T> ? compare]) → List<T> -
Available on Iterable<
Creates a reversed sorted list of the elements of the iterable.T> , provided by the FicIterableExtension extension -
sortLike(
Iterable ordering) → void -
Available on List<
Sorts this list according to the order specified by theT> , provided by the FicListExtension extensionorderingiterable. Items which don't appear inorderingwill be included in the end, in their original order. Items oforderingwhich are not found in the original list are ignored. -
sortOrdered(
[int compare(T a, T b)?]) → void -
Available on List<
Sorts this list according to the order specified by theT> , provided by the FicListExtension extensioncomparefunction. -
sortReversed(
[int compare(T a, T b)?]) → void -
Available on List<
Sorts this list in reverse order in relation to the default sort method.T> , provided by the FicListExtension extension -
sortWith<
A> (A extract(T t), Order< A> order) → List<T> -
Available on Iterable<
Sort this Iterable based onT> , provided by the ElementalOnIterable extensionorderof an object of typeAextracted fromTusingextract. -
sortWithDate(
DateTime getDate(T instance)) → List< T> -
Available on Iterable<
Sort this Iterable based on DateTime extracted from typeT> , provided by the ElementalOnIterable extensionTusinggetDate. -
span(
bool test(T t)) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is longest prefix (possibly empty) of this Iterable with elements that satisfyT> , provided by the ElementalOnIterable extensiontestand second element is the remainder of the Iterable. -
splitAt(
int n) → (Iterable< T> , Iterable<T> ) -
Available on Iterable<
Return a record where first element is an Iterable with the firstT> , provided by the ElementalOnIterable extensionnelements of this Iterable, and the second element contains the rest of the Iterable. -
splitByLength(
int length) → List< List< T> > -
Available on List<
Cut the original list into one or more lists with at mostT> , provided by the FicListExtension extensionlengthitems. -
splitList(
bool test(T item), {bool emptyParts = false}) → Iterable< List< T> > -
Available on List<
Split a list, according to a predicate, removing the list item that satisfies the predicate.T> , provided by the FicListExtension extension -
sublist(
int start, [int? end]) → List< T> -
Returns a new list containing the elements between
startandend.override -
sumBy<
N extends num> (N mapper(T element)) → N -
Available on Iterable<
The sum of the values returned by theT> , provided by the FicIterableExtension extensionmapperfunction. -
take(
int count) → Iterable< T> -
Creates a lazy iterable of the
countfirst elements of this iterable.override -
takeWhile(
bool test(T value)) → Iterable< T> -
Creates a lazy iterable of the leading elements satisfying
test.override -
takeWhileLeft(
bool test(T t)) → Iterable< T> -
Available on Iterable<
Extract all elements starting from the first as long asT> , provided by the ElementalOnIterable extensiontestreturnstrue. -
toggle(
T item) → bool -
Available on List<
If the item does not exist in the list, add it and returnT> , provided by the FicListExtension extensiontrue. If it already exists, remove the first instance of it and returnfalse. -
toggle(
T item) → bool -
Available on Set<
If the item doesn't exist in the set, add it and returnT> , provided by the FicSetExtension extensiontrue. Otherwise, if the item already exists in the set, remove it and returnfalse. -
toIList(
[ConfigList? config]) → IList< T> -
Available on Iterable<
Creates an immutable list (IList) from the iterable.T> , provided by the FicIterableExtension extension -
toISet(
[ConfigSet? config]) → ISet< T> -
Available on Iterable<
Creates an immutable set (ISet) from the iterable.T> , provided by the FicIterableExtension extension -
toJson(
Object? toJsonT(T)) → Object -
Converts to JSon. Json serialization support for json_serializable with @JsonSerializable.
override
-
toList(
{bool growable = true}) → List< T> -
Creates a List containing the elements of this Iterable.
override
-
toSet(
) → Set< T> -
Creates a Set with the same elements and behavior as this
Set.override -
toString(
) → String -
A string representation of this object.
inherited
-
union(
covariant Set< T> other) → Set<T> -
Creates a new set which contains all the elements of this set and
other.override -
unzip(
) → Tuple2< Iterable< U> , Iterable<V> > -
Available on Iterable<
Iterable Tuple2 as IterableTuple2< , provided by the FICZipExtension extensionU, V> > -
updateById(
Iterable< T> newItems, dynamic id(T item)) → List<T> -
Available on Iterable<
Returns a new list whereT> , provided by the FicIterableExtension extensionnewItemsare added or updated, by theirid(and theidis a function of the item), like so: -
where(
Predicate< T> test) → Iterable<T> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test.override -
whereMoveToTheEnd(
bool test(T item)) → void -
Available on List<
Moves all items that satisfy the providedT> , provided by the FicListExtension extensiontestto the end of the list. Keeps the relative order of the moved items. -
whereMoveToTheFront(
bool test(T item)) → void -
Available on List<
Moves all items that satisfy the providedT> , provided by the FicListExtension extensiontestto the start of the list. Keeps the relative order of the moved items. -
whereNoDuplicates(
{dynamic by(T item)?, bool removeNulls = false}) → Iterable< T> -
Available on Iterable<
Removes all duplicates, leaving only the distinct items. Optionally, you can provide anT> , provided by the FicIterableExtension extensionbyfunction to compare the items. -
whereType<
E> () → Iterable< E> -
Creates a new lazy Iterable with all elements that have type
T.override -
withNullsRemoved(
) → List< T> -
Available on List<
Returns a new List with allT?> , provided by the FicListExtensionNullable extensionnulls removed. This may return a list with a non-nullable type. -
zip<
B> (Iterable< B> iterable) → Iterable<(T, B)> -
Available on Iterable<
T> , provided by the ElementalOnIterable extensionzipis used to join elements at the same index from two different Iterable into one Iterable of a record. -
zipWith<
B, C> (C combine(T t, B b), Iterable< B> iterable) → Iterable<C> -
Available on Iterable<
Join elements at the same index from two different Iterable into one Iterable containing the result of callingT> , provided by the ElementalOnIterable extensioncombineon each element pair.
Operators
-
operator +(
List< T> other) → ListSet<T> -
Returns the concatenation of this list and
other.override -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
int index) → T -
The object at the given
indexin the list.override -
operator []=(
int index, T value) → void -
Sets the value at the given
indexin the list tovalue.override