A Composition that is created for composing Queries that expose AsyncValues, such as FutureQuery and StreamQuery.
the AsyncComposition.compose method returns a Future while the Composition emits a single AsyncValue that represents the state of the Future,
which can be loading, error or data. It is used to easily compose multiple async queries' AsyncValues together and manage their state in a single AsyncValue.
A class that represents the state of an asynchronous operation. It can be in one of three states: loading, error or data.
It is used to represent the state of a query that is based on a Future or a
Stream, and it is used to manage the state of the query in the query container.
A command mutates the state. Because of mutated state it is possible
That some queries become invalid. To reflect this an additional method
checks given the mutation result which queries must be invalidated
The composer is a simple dumb function that fetches
data from multiple queries
This interface is the way you need to interact with your
queries from a ComposerRuntime
A base class for all events that can be emitted by the world.
It contains the common properties of all events, such as the time
of the event and the name of the component that emitted the event.
A base class for queries that are based on a Future. It handles the common logic of
managing the AsyncValue state and the cancellation of the Future when the query is invalidated.
A query defines an interface where T is the return type of the query
and a method that can construct it from it's own definition.
Aside from that it should also define an initial state
Specific event for the invalidation of a query. A query is invalidated when it needs to be re-executed,
for example, a command explicitly invalidates a query after mutating the state
A base class for queries that are based on a Stream. It handles the common logic of
managing the AsyncValue state and the cancellation of the Stream subscription when the query is invalidated
A base class for compositions that are based on a synchronous computation. It handles the common logic of
managing the state and the execution of the composition when the composition container is executed or invalidated
A base class for queries that are based on a synchronous computation. It handles the common logic of
managing the state and the execution of the query when the query container is executed or invalidated
A base class for view widgets. It handles the common logic of subscribing to the Composition and running Mutations.
It also defines the build method that will be called to build the widget based on the composition state and the notifier.
The world is the context where all the application state lives in. It is responsible for managing the lifecycle of the state,
and providing a way to access it from the views and the view models.
The world is created with a list of WorldPlugins that can be used to extend the functionality of the world,
and a list of Observers that can be used to observe the events in the world.
specific event for the settling of the world. The world is considered settled when it has finished processing
all the pending commands, queries, etc., and its state is stable.