Single-Action Screen Layout
Component Detail
Description
A composable screen wrapper that enforces the cognitive accessibility rule of at most three primary choices per screen. Provides consistent structural layout with a single prominent primary action, preventing designers and developers from accidentally violating the constraint.
single-action-screen-layout
Summaries
The Single-Action Screen Layout is a structural guardrail that protects the cognitive accessibility of every screen in the application. By enforcing a maximum of three primary choices per screen, the product avoids decision paralysis — a well-documented barrier for users with cognitive impairments, low digital literacy, or high stress. This directly supports the organization's inclusive design commitments and helps the product comply with accessibility standards that increasingly carry legal weight in Nordic markets. Reuse across all screens also ensures a consistent, professional user interface that reduces training costs and support demand.
Rated medium complexity due to the structural nature of the component — it acts as the root wrapper for every mobile screen, meaning its API must be agreed upon before feature teams begin building their individual screens. This creates a soft dependency across almost all mobile development tracks. Flutter debug assertions provide built-in constraint checking during development, reducing QA overhead for action-count violations. The main delivery risk is API instability: if primaryAction or secondaryActions signatures change after feature teams have adopted the component, widespread refactoring is required.
A stable, reviewed interface contract should be locked before parallel feature development begins.
SingleActionScreenLayout is a composable Flutter widget implementing the standard screen scaffold for all mobile views. It accepts title (String), body (Widget), primaryAction (ActionConfig), and secondaryActions (List
As a shared wrapper, changes to this component should go through a design-system review process and be communicated to all feature teams before merging.
Responsibilities
- Constrain primary action slots to a maximum of three
- Provide consistent header, body, and action-bar zones
- Assert layout constraints in debug mode with Flutter assertions
Interfaces
SingleActionScreenLayout({title, body, primaryAction, secondaryActions})
validateActionCount(actions)
buildActionBar()