ListBloomElementsExtension<E> extension
Reactive extensions on BloomListElements providing high-performance list operations.
Architectural Benefits
All transformations operating on BloomListElements return new reactive Bloom nodes. List-producing operations immediately wrap returned lists with List.unmodifiable to guarantee state immutability across reactive cycles.
Data Propagation Flow
[Source Bloom<List<E>>]
│ (Push-Dirty)
▼
[Reactive List Extension Operators]
├─► .binarySearch(target) ──► Reactive Index Bloom<int> (O(log N))
├─► .sortedRange(0, 5) ──► Immutable Sub-range Sorted Bloom<List<E>>
├─► .swapped(i, j) ──► Immutable Swapped Bloom<List<E>>
└─► .slices(pageSize) ──► Paginated Bloom<List<List<E>>>
Examples
final listController = blooming<List<int>>([10, 20, 30, 40, 50]);
final indexBloom = listController.bloom.elements.binarySearch(30, (a, b) => a.compareTo(b));
final swappedList = listController.bloom.elements.swapped(0, 4);
print(untracked(indexBloom)); // 2
- on
Methods
-
binarySearch(
E element, int compare(E a, E b)) → Bloom< int> -
Available on BloomListElements<
Returns the index ofE> , provided by the ListBloomElementsExtension extensionelementin this sorted list via binary search. -
binarySearchBy<
K extends Comparable> (E element, K keyOf(E element), [int start = 0, int? end]) → Bloom< int> -
Available on BloomListElements<
Returns the index ofE> , provided by the ListBloomElementsExtension extensionelementin this sorted list by key natural order. -
binarySearchByCompare<
K> (E element, K keyOf(E element), int compare(K a, K b), [int start = 0, int? end]) → Bloom< int> -
Available on BloomListElements<
Returns the index ofE> , provided by the ListBloomElementsExtension extensionelementin this sorted list by comparing key extracted viakeyOf. -
elementAtOrNull(
int index) → Bloom< E?> -
Available on BloomListElements<
Returns theE> , provided by the ListBloomElementsExtension extensionindexth element reactively, ornullif out of range. -
equals(
List< E> other, [Equality<E> equality = const DefaultEquality()]) → Bloom<bool> -
Available on BloomListElements<
WhetherE> , provided by the ListBloomElementsExtension extensionotherhas the same elements as this list reactively. -
lowerBound(
E element, int compare(E a, E b)) → Bloom< int> -
Available on BloomListElements<
Returns the index whereE> , provided by the ListBloomElementsExtension extensionelementshould be inserted in this sorted list. -
lowerBoundBy<
K extends Comparable> (E element, K keyOf(E element), [int start = 0, int? end]) → Bloom< int> -
Available on BloomListElements<
Returns the index whereE> , provided by the ListBloomElementsExtension extensionelementshould be inserted by key natural order. -
lowerBoundByCompare<
K> (E element, K keyOf(E element), int compare(K a, K b), [int start = 0, int? end]) → Bloom< int> -
Available on BloomListElements<
Returns the index whereE> , provided by the ListBloomElementsExtension extensionelementshould be inserted by comparing key extracted viakeyOf. -
reversedRange(
int start, int end) → Bloom< List< E> > -
Available on BloomListElements<
Returns a new unmodifiable list with a range of elements reversed reactively.E> , provided by the ListBloomElementsExtension extension -
shuffledRange(
int start, int end, [Random? random]) → Bloom< List< E> > -
Available on BloomListElements<
Returns a new unmodifiable list with a range of elements shuffled reactively.E> , provided by the ListBloomElementsExtension extension -
slice(
int start, [int? end]) → Bloom< List< E> > -
Available on BloomListElements<
Returns a sublist of this list reactively.E> , provided by the ListBloomElementsExtension extension -
slices(
int length) → Bloom< List< List< >E> > -
Available on BloomListElements<
Contiguous slices of this list with the givenE> , provided by the ListBloomElementsExtension extensionlengthreactively. -
sortedBy<
K extends Comparable> (K keyOf(E element), [int start = 0, int? end]) → Bloom< List< E> > -
Available on BloomListElements<
Returns a new unmodifiable list containing elements sorted by key extracted viaE> , provided by the ListBloomElementsExtension extensionkeyOf. -
sortedByCompare<
K> (K keyOf(E element), int compare(K a, K b), [int start = 0, int? end]) → Bloom< List< E> > -
Available on BloomListElements<
Returns a new unmodifiable list containing elements sorted byE> , provided by the ListBloomElementsExtension extensioncompareof key extracted viakeyOf. -
sortedRange(
int start, int end, int compare(E a, E b)) → Bloom< List< E> > -
Available on BloomListElements<
Returns a new unmodifiable list containing a sorted range of elements from this list.E> , provided by the ListBloomElementsExtension extension -
swapped(
int index1, int index2) → Bloom< List< E> > -
Available on BloomListElements<
Returns a new unmodifiable list with two elements swapped reactively.E> , provided by the ListBloomElementsExtension extension