api property

Object? api

The api object should contain all public methods that a consumer can use to mutate module state (methods) or query existing module state (getters).

api is initially null. If a module exposes a public api, this should be overridden to provide a class defined specifically for the module.

If using with w_flux internals, module mutation methods should usually dispatch existing actions available within the module. This ensures that the internal unidirectional data flow is maintained, regardless of the source of the mutation (e.g. external api or internal UI). Likewise, module methods that expose internal state should usually use existing getter methods available on stores within the module.

Implementation

Object? get api => null;