RtlHelper class abstract final

Utility class for RTL-aware layouts and text direction detection.

final isRtl = RtlHelper.isRtl(context);  // true for Arabic, Persian, Hebrew, Urdu
Padding(padding: RtlHelper.paddingStart(context, 16))

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

backArrow(BuildContext context) → IconData
Returns the correct arrow icon for backward navigation.
crossAxisStart(BuildContext context) → CrossAxisAlignment
Returns CrossAxisAlignment.end for RTL and start for LTR.
flipOffset(BuildContext context, Offset offset) → Offset
Flips a horizontal offset for RTL layouts.
forwardArrow(BuildContext context) → IconData
Returns the correct arrow icon for forward navigation (right arrow in LTR, left arrow in RTL).
isRtl(BuildContext context) → bool
Returns true if the current text direction is RTL.
paddingEnd(BuildContext context, double value) → EdgeInsetsDirectional
Logical end padding (right in LTR, left in RTL).
paddingHorizontal(double value) → EdgeInsetsDirectional
Logical start + end padding.
paddingStart(BuildContext context, double value) → EdgeInsetsDirectional
Logical start padding (left in LTR, right in RTL).
textAlign(BuildContext context) → TextAlign
Returns TextAlign.right for RTL locales, TextAlign.left for LTR.
textAlignOpposite(BuildContext context) → TextAlign
Returns TextAlign.left for RTL locales (opposite of content alignment).