w_module library

The w_module library implements a module encapsulation and lifecycle pattern for Dart that interfaces well with the application architecture defined in the w_flux library.

w_module defines how data should flow in and out of a module, how renderable UI is exposed to consumers, and establishes a common module lifecycle that facilitates dynamic loading / unloading of modules.

Classes

DispatchKey
Key that enables dispatching of events. Every Event is associated with a specific key, and that key must be used in order to dispatch an item to that event stream. [...]
Event<T>
An event stream that can be listened to. A dispatch key is required to instantiate the event stream. The same dispatch key must subsequently be used to dispatch all events on the stream, effectively preventing uncontrolled external dispatch.
EventsCollection
A base class for a collection of Event instances that are all tied to the same DispatchKey. [...]
LifecycleModule
Intended to be extended by most base module classes in order to provide a unified lifecycle API.
Module
A Module encapsulates a well-scoped logical unit of functionality and exposes a discrete public interface for consumers. It extends LifecycleModule to ensure that it adheres to a well-defined lifecycle. [...]
ModuleComponents
Standard ModuleComponents class. If a module implements a custom class for its components, it should extend ModuleComponents.
ShouldUnloadResult
A set of messages returned from the hierarchical application of shouldUnload
SimpleModule
A SimpleModule encapsulates a well-scoped logical unit of functionality and exposes a discrete public interface for consumers. [...]
StartupTimingType
The type of 'startup timing metric' to be used by specifyStartupTiming

Exceptions / Errors

ModuleUnloadCanceledException
Exception thrown when unload fails.