walletRowStacksAction function

bool walletRowStacksAction(
  1. BuildContext context,
  2. double availableWidth
)

Whether a row that carries text plus its trailing action(s) must move them under the text. (One action on the notices, two on the parked-send and in-flight-swap rows — the more actions, the earlier the row starves.)

availableWidth is the row's own maximum width — take it from a LayoutBuilder rather than the screen, so an embedding inside a narrow column (a host's split view, a sheet) is judged on the space the row actually has.

A NON-FINITE width stacks. Every caller's inline branch holds an Expanded, which asserts under unbounded width, so an unbounded embedding must not be answered with the inline layout: infinity < 520 is false, which would pick exactly the branch that cannot survive it. Unreachable through the package's own surfaces today (they all sit in a bounded ListView), but this is now the single definition and it should be safe for the degenerate input rather than accidentally correct for the reachable one.

The row still needs a bounded-width ANCESTOR for its own Expanded/ Flexible children — the stack only decides where the action goes, it cannot rescue a layout with no width to divide.

Implementation

bool walletRowStacksAction(BuildContext context, double availableWidth) =>
    !availableWidth.isFinite ||
    availableWidth < kWalletStackRowWidth ||
    walletTextScaleForcesStack(context);