swapControllerProvider top-level property
The swap flow state machine (D-2b-1 / §3.3b): form → quote → review → execute
→ deposit → tracking. Drives the swap screen; Rust stays the single source
of truth (design invariant 1) — every step forwards straight to the SDK and no
swap state is cached here. BOTH directions (SwapFlowDirection): OutOfZec
(ZEC → a foreign asset; the wallet sends the §4.4 deposit) and IntoZec (a
foreign asset → ZEC; the USER sends the deposit externally, so execute lands on
the SwapAwaitingDeposit D7 screen before tracking).
Non-autoDispose (mirrors sendControllerProvider; Riverpod 3.x has no
AutoDisposeNotifier): a fresh entry resets via resetToForm. It reads the
live WalletSession through providers (cached in build for the actions),
exactly the seam the screen tests override.
Implementation
final swapControllerProvider = NotifierProvider<SwapController, SwapFlowState>(
SwapController.new,
);