listen method

void listen(
  1. void callback(
    1. ExecutedData<A, B> value
    )
)

Listens for changes in the data and calls the provided callback with the new value.

Implementation

void listen(void Function(ExecutedData<A, B> value) callback) {
  if (value.isEmpty) load();
  addListener(() => callback(value));
}