Skip to main content

Module direction

Module direction 

Source
Expand description

Direction-aware layout helpers.

These helpers let widget authors write layouts in terms of logical start / end rather than physical left / right. Pass the application’s LayoutDirection and the helper resolves the order for you.

§Why these exist

Without helpers, a widget that wants to be ABDD-compliant has to write a match on LayoutDirection every time it builds a row!. That pattern quickly becomes noisy and error-prone — it is easy to forget one occurrence and ship an RTL bug. These helpers centralise the decision.

Functions§

row_dir
A two-slot horizontal row in logical order.
row_dir_three
A three-slot horizontal row in logical order: start, center, end.