DataExecutor<A, B> class
abstract
An abstract class that manages the execution and modification of data.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
ExecutedData< A, B> > - DataExecutor
Constructors
-
DataExecutor([ExecutedData<
A, B> ? state]) - Constructs a DataExecutor with an optional initial state.
Properties
-
base
→ Iterable<
A> -
Returns the base data.
no setter
- converting ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isBase → bool
-
Returns true if the current value is in its base state.
no setter
- isModified → bool
-
Returns true if the current value is in its modified state.
no setter
- loading ↔ bool
-
getter/setter pair
-
modified
→ Iterable<
B> -
Returns the modified data.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
value
↔ ExecutedData<
A, B> -
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
convert(
A root) → Future< B> -
Converts a single item of type
A
to typeB
. -
converts(
Iterable< A> root) → Future<Iterable< B> > -
Converts a list of items of type
A
to a list of items of typeB
. -
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
-
execute(
Iterable< A> root) → void - Executes the conversion of the base data.
-
fetch(
) → Future< Iterable< A> > - Fetches the base data.
-
listen(
void callback(ExecutedData< A, B> value)) → void - Listens for changes in the data and calls the provided callback with the new value.
-
listenOnlyModified(
void callback(Iterable< B> value)) → void - Listens for changes in the modified data and calls the provided callback with the new modified data.
-
load(
) → void - Loads the base data and executes the conversion.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
refresh(
[bool reload = false]) → void - Refreshes the data and optionally reloads the base data.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited