DatabaseListProvided<T> class
abstract
- Inheritance
-
- Object
- Iterable<
T> - ListSerializable<
T> - ListProvided<
T> - DatabaseListProvided
- Implementers
- Available extensions
Constructors
- DatabaseListProvided()
- Creates an empty DatabaseListProvided.
Properties
- first → T
-
The first element.
no setterinherited
- firstOrNull → T?
-
Available on Iterable<
The first element of this iterator, orT> , provided by the IterableExtensions extensionnull
if the iterable is empty.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
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 - isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
T> -
A new
Iterator
that allows iterating the elements of thisIterable
.no setterinherited - last → T
-
The last element.
no setterinherited
- lastOrNull → T?
-
Available on Iterable<
The last element of this iterable, orT> , provided by the IterableExtensions extensionnull
if the iterable is empty.no setter - length → int
-
The number of elements in this Iterable.
no setterinherited
-
nonNulls
→ Iterable<
T> -
Available on Iterable<
The non-T?> , provided by the NullableIterableExtensions extensionnull
elements of this iterable.no setter - 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 setterinherited
- singleOrNull → T?
-
Available on Iterable<
The single element of this iterator, orT> , provided by the IterableExtensions extensionnull
.no setter -
wait
→ Future<
List< T> > -
Available on Iterable<
Waits for futures in parallel.Future< , provided by the FutureIterable extensionT> >no setter
Methods
-
add(
T item, {bool notify = true}) → void -
Adds
item
to the end of this list, extending the length by one.inherited -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
any(
bool test(T element)) → bool -
Checks whether any element of this iterable satisfies
test
.inherited -
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 -
byName(
String name) → T -
Available on Iterable<
Finds the enum value in this list with nameT> , provided by the EnumByName extensionname
. -
cast<
R> () → Iterable< R> -
A view of this iterable as an iterable of
R
instances.inherited -
clear(
{bool notify = true}) → void -
Removes all objects from this list; the length of the list becomes zero.
inherited
-
contains(
Object? element) → bool -
Whether the collection contains an element equal to
element
.inherited -
deserialize(
dynamic map) → void -
You can't use this function with DatabaseListProvided, as it already saves its content in the cloud automagically.
override
-
deserializeItem(
dynamic data) → T -
Returns a new
T
from the provided serialized data.inherited -
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
elementAt(
int index) → T -
Returns the
index
th element.inherited -
elementAtOrNull(
int index) → T? -
Available on Iterable<
The element at positionT> , provided by the IterableExtensions extensionindex
of this iterable, ornull
. -
every(
bool test(T element)) → bool -
Checks whether every element of this iterable satisfies
test
.inherited -
expand<
T> (Iterable< T> toElements(T element)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
firstWhere(
bool test(T element), {T orElse()?}) → T -
The first element that satisfies the given predicate
test
.inherited -
fold<
T> (T initialValue, T combine(T previousValue, T element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(
Iterable< T> other) → Iterable<T> -
Creates the lazy concatenation of this iterable and
other
.inherited -
forceNotify(
) → void -
If for some reason one needs to call notifier, they can call forceNotify
inherited
-
forEach(
void action(T element)) → void -
Invokes
action
on each element of this iterable in iteration order.inherited -
fromId(
String id) → T -
Return the element with specified
id
.inherited -
indexWhere(
bool test(T element), [int start = 0]) → int -
The first index in the list that satisfies the provided
test
.inherited -
join(
[String separator = ""]) → String -
Converts each element to a String and concatenates the strings.
inherited
-
lastWhere(
bool test(T element), {T orElse()?}) → T -
The last element that satisfies the given predicate
test
.inherited -
map<
T> (T toElement(T e)) → Iterable< T> -
This is a simple interface to the map method of the list
inherited
-
move(
int oldIndex, int newIndex, {bool notify = true}) → void -
Moves an item from one position to another
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
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.
inherited
-
remove(
dynamic value, {bool notify = true}) → void -
Removes a single item from the list.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
replace(
T item, {bool notify = true}) → void -
Updates the value of
item
.inherited -
serialize(
) → Map< String, dynamic> -
Serializes all of its items into a single map, separted by their id.
inherited
-
singleWhere(
bool test(T element), {T orElse()?}) → T -
The single element that satisfies
test
.inherited -
skip(
int count) → Iterable< T> -
Creates an Iterable that provides all but the first
count
elements.inherited -
skipWhile(
bool test(T value)) → Iterable< T> -
Creates an
Iterable
that skips leading elements whiletest
is satisfied.inherited -
take(
int count) → Iterable< T> -
Creates a lazy iterable of the
count
first elements of this iterable.inherited -
takeWhile(
bool test(T value)) → Iterable< T> -
Creates a lazy iterable of the leading elements satisfying
test
.inherited -
toList(
{bool growable = true}) → List< T> -
Creates a List containing the elements of this Iterable.
inherited
-
toSet(
) → Set< T> -
Creates a Set containing the same elements as this iterable.
inherited
-
toString(
) → String -
Returns a string representation of (some of) the elements of
this
.inherited -
where(
bool test(T element)) → Iterable< T> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test
.inherited -
whereType<
T> () → Iterable< T> -
Creates a new lazy Iterable with all elements that have type
T
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
dynamic value) → T -
Returns the item at the location specified by
value
.inherited -
operator []=(
dynamic value, T item) → void -
Sets the value of the item to
item
at the specified location.inherited