Skip to main content

Package structure


Dependency direction

Widgets consume notifier state but never call contracts directly.

Data flow

  1. Your Riverpod provider instantiates a notifier, injecting your contract implementations.
  2. Your screen calls a notifier method (e.g. fetchWallets()).
  3. The notifier calls the contract, maps the result to an Either<EmbeddedFailure, T>, and emits new state.
  4. Widgets observe state and rebuild.

Error model

All notifier methods return void / Future<void>. Failures are surfaced through the hasError / failure fields of each state class:
See Failures for all subtypes.

Offline & caching strategy

Each notifier accepts optional EmbeddedWalletStorage and EmbeddedWalletBalanceCache contracts. When a fetch fails (network error), the notifier transparently falls back to cached data: