ListControl<T> class

Extended version of FieldControl specified to List.

Inheritance
Available Extensions

Constructors

ListControl([Iterable<T>? items])
FieldControl of List.

Properties

first → T?
List.first
no setter
hashCode int
The hash code for this object.
no setterinherited
internalData ↔ dynamic
getter/setter pairinherited
isActive bool
Checks if Stream is not closed.
no setterinherited
isClosed bool
Returns true if current stream is closed.
no setterinherited
isEmpty bool
Return true if there is no item.
no setteroverride
isNotEmpty bool
Return true if there is one or more items.
no setteroverride
isValid bool
no setterinherited
last → T?
List.last
no setter
length int
Returns number of items in list.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sink Sink<List<T>>
Default sink of this controller. Use sinkConverter to convert input data.
no setterinherited
stream Stream<List<T>?>
no setterinherited
value List<T>?
getter/setter pairinherited

Methods

add(T item) → void
Adds item to List and notifies stream.
addAll(Iterable<T> items) → void
Adds all items to List and notifies stream.
any(bool test(T element)) bool
Iterable.any.
asMap() Map<int, T>
List.asMap.
cancel(ControlSubscription<List<T>?> subscription) → void
inherited
cast<U>() ObservableValue<U>
inherited
clear({bool disposeItems = false}) → void
Iterable.clear.
contains(Object object) bool
Iterable.contains.
containsIndex(int index) bool
Checks if index is within value bounds.
dispose() → void
Used to clear and dispose object. After this method call is object typically unusable and ready for GC. Can be called multiple times!
override
every(bool test(T element)) bool
Iterable.every.
filterTo(FieldControl controller, {Function? onError, void onDone()?, bool cancelOnError = false, ValueConverter? converter, Predicate<T>? filter}) StreamSubscription
Filters data into given controller.
firstWhere(Predicate<T> test) → T?
Iterable.firstWhere. If no element satisfies test, then return null.
fold<E>(E initialValue, E combine(E previousValue, T element)) → E
Iterable.fold.
forEach(void f(T item)) → void
Iterable.forEach.
getRange(int start, int end) Iterable<T>
List.getRange.
indexOf(T object) int
Iterable.indexOf
indexWhere(Predicate<T> test, [int start = 0]) int
Iterable.indexWhere
insert(int index, T item) → void
Adds item to List at given index and notifies stream.
join([String separator = ""]) String
Iterable.join.
lastIndexOf(T element, [int? start]) int
List.lastIndexOf.
lastIndexWhere(bool test(T element), [int? start]) int
List.lastIndexWhere.
lastWhere(Predicate<T> test) → T?
Iterable.firstWhere. If no element satisfies test, then return null.
map<E>(E f(T item)) Iterable<E>
Iterable.map.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Notifies current Stream.
override
onFuture(Future future, {ValueConverter? converter}) Future
Sets value after future finishes. Via ValueConverter is possible to convert object from input Stream type to own stream value. Returns Future to await and register other callbacks.
inherited
reduce(T combine(T value, T element)) → T
Iterable.reduce.
remove(T? item) bool
Removes item from List and notifies stream.
removeAt(int index) → T
Removes item from List at given index and notifies stream.
removeWhere(Predicate<T> test) → void
Iterable.removeWhere.
replace(T item, Predicate<T> test, [bool notify = true]) bool
Replaces first item in List for given test
replaceAll(Iterable<T> items, Predicate<T> test) → void
For every item is performed replace
setValue(Iterable<T>? items, {bool notify = true, bool forceNotify = false}) → void
override
shuffle([Random? random]) → void
Iterable.shuffle.
sinkConverter(ValueConverter<List<T>> converter) Sink
Returns Sink with custom ValueConverter.
inherited
skip(int count) Iterable<T>
Iterable.skip.
skipWhile(bool test(T value)) Iterable<T>
Iterable.skipWhile.
softDispose() → void
Clears subscribers, but didn't close Stream entirely.
inherited
sort([int compare(T a, T b)?]) → void
Iterable.sort.
sublist(int start, [int? end]) List<T>
List.sublist.
subscribe(ValueCallback<List<T>?> action, {bool current = true, dynamic args}) FieldSubscription<List<T>>
inherited
subscribeStream(void onData(List<T>? event), {Function? onError, void onDone()?, bool cancelOnError = false, bool current = true}) FieldSubscription<List<T>>
inherited
subscribeTo(Stream stream, {Function? onError, void onDone()?, bool cancelOnError = false, ValueConverter? converter}) FieldSubscription
Subscribes this field to given Stream. Controller will subscribe to input stream and will listen for changes and populate this changes into own stream. Via ValueConverter is possible to convert object from input Stream type to own stream value. StreamSubscription is automatically closed during dispose phase of FieldControl. Returns FieldSubscription for manual cancellation.
inherited
swap(int indexA, int indexB) → void
Swaps position of items at given indexes
take(int count) Iterable<T>
Iterable.take.
takeWhile(bool test(T value)) Iterable<T>
Iterable.takeWhile.
toList({bool growable = true}) List<T>
Iterable.toList.
toSet() Set<T>
Iterable.toSet.
toString() String
A string representation of this object.
inherited
where(Predicate<T> test) Iterable<T>
Iterable.where.

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) → T?
Returns the object at given index.