SendController class

Constructors

SendController()

Properties

flowId → int
Identity of the flow the machine is currently running (FR-26).
no setter
hashCode → int
The hash code for this object.
no setterinherited
ref → Ref
The Ref associated with this notifier.
no setterinherited
requestRevoked → bool
Whether the host request the running flow was opened with has lost its ability to spend (stage S8 deadline, R05) — the entry's mount grace ran out before a screen appeared and the host was told "no transaction", which is final for that request.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state ↔ SendState
The value currently exposed by this notifier.
getter/setter pairinherited
stateOrNull → SendState?
The value currently exposed by this Notifier.
no setterinherited

Methods

abandonFlow(int flowId) → void
Mark flowId abandoned: the screen that ran it is gone (S13 §1a H1).
backToForm() → void
Return to the form from the review/result/queued screens (the Back / Send another / Edit actions). A no-op mid-flight (a transient state) so a stray tap can't abandon an in-flight sign.
build() → SendState
Initialize a Notifier.
confirm() → Future<void>
Sign + broadcast the reviewed proposal (the SECOND half) — consumes the one-shot token by id. A per-tx broadcast failure is DATA, not a throw, so it lands on the result screen as "saved for retry"; a thrown typed error routes per classifySendFailure (already-submitted / sign-failed / stale → form).
hasEnteredSpend(int flowId) → bool
Flows whose spend closure was actually ENTERED (FR-26).
isRevokedRequest(WalletSendRequest request) → bool
Whether request is one the entry's mount grace revoked — the same request under sameSendRequest — and therefore must not pay through a bare door (a re-navigation with the request alone, in place or on a fresh mount). The screen reads this for a bare request; a request that arrived on a live channel is answered by the channel, not by this memory.
listenSelf(void listener(SendState? previous, SendState next), {void onError(Object error, StackTrace stackTrace)?}) → RemoveListener
Listens to changes on the value exposed by this provider.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare({required String address, required String amountText, String? memo, WalletMachineMemo? machineMemo}) → Future<void>
Compose the ZIP-321 URI from the form and propose (the FIRST half). On success → SendReview with the confirmable numbers; on a typed failure → back to SendForm with an honest inline fault. The amount is parsed host-side first (integer-exact, never via double).
queueOffline({required String address, required String amountText, String? memo, WalletMachineMemo? machineMemo}) → Future<void>
Queue the send for OFFLINE-first delivery — durably persist the intent (no network/signing/money movement) and land on SendQueued. The offline fork: proposing is deferred to send-time so a long-queued send never carries a stale anchor. A typed failure (e.g. queue full) returns to the form.
resetToForm({bool requestRevoked = false}) → void
Reset to a clean form — called on screen entry so a prior terminal result (a completed/queued send) never lingers into a new send. A NO-OP while a step is in flight (review F1): the screens are exit-able mid-Submitting, so re-entering must RE-ATTACH to the running flow — clobbering the transient here would make the identity guards swallow the landing outcome, hiding a completed send exactly in the re-pay temptation window (mirrors backToForm's in-flight guard).
revokeRequest(WalletSendRequest request) → void
Record that the entry's mount grace revoked request (see _revokedRequests). Idempotent under sameSendRequest.
runBuild() → WhenComplete?
Executes Notifier.build.
inherited
toString() → String
A string representation of this object.
inherited
updateShouldNotify(SendState previous, SendState next) → bool
A method invoked when the state exposed by this Notifier changes. It compares the previous and new value, and return whether listeners should be notified.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited