FHUContextDirectionality extension

Extension methods for accessing text directionality from a BuildContext.

on

Properties

countryCode → String?

Available on BuildContext, provided by the FHUContextDirectionality extension

The country code of the current locale (e.g., "US" for United States).
no setter
directionality → TextDirection

Available on BuildContext, provided by the FHUContextDirectionality extension

The current text direction from the ambient Directionality.
no setter
isLTR → bool

Available on BuildContext, provided by the FHUContextDirectionality extension

Whether the current text direction is left-to-right.
no setter
isRTL → bool

Available on BuildContext, provided by the FHUContextDirectionality extension

Whether the current text direction is right-to-left.
no setter
languageCode → String

Available on BuildContext, provided by the FHUContextDirectionality extension

The language code of the current locale (e.g., "en" for English).
no setter
locale → Locale

Available on BuildContext, provided by the FHUContextDirectionality extension

The current locale from Localizations.
no setter
localeString → String

Available on BuildContext, provided by the FHUContextDirectionality extension

A string representation of the current locale.
no setter
logicalEnd → double

Available on BuildContext, provided by the FHUContextDirectionality extension

Helper for RTL-aware logical end position. Returns 0.0 for RTL and 1.0 for LTR.
no setter
logicalEndAlignment → AlignmentGeometry

Available on BuildContext, provided by the FHUContextDirectionality extension

Returns an RTL-aware alignment for logical end position.
no setter
logicalStart → double

Available on BuildContext, provided by the FHUContextDirectionality extension

Helper for RTL-aware logical start position. Returns 1.0 for RTL and 0.0 for LTR.
no setter
logicalStartAlignment → AlignmentGeometry

Available on BuildContext, provided by the FHUContextDirectionality extension

Returns an RTL-aware alignment for logical start position.
no setter
scriptCode → String?

Available on BuildContext, provided by the FHUContextDirectionality extension

The script code of the current locale (e.g., "Hant" for Traditional Chinese).
no setter

Methods

directionAwareOffset(double x, double y) → Offset

Available on BuildContext, provided by the FHUContextDirectionality extension

Returns a direction-aware translation offset.
isCountryCode(String? countryCode) → bool

Available on BuildContext, provided by the FHUContextDirectionality extension

Returns true if the current locale matches the given country code.
isLanguageCode(String languageCode) → bool

Available on BuildContext, provided by the FHUContextDirectionality extension

Returns true if the current locale matches the given language code.
isScriptCode(String scriptCode) → bool

Available on BuildContext, provided by the FHUContextDirectionality extension

Returns true if the current locale matches the given script code.
logicalMargin({double start = 0.0, double end = 0.0, double top = 0.0, double bottom = 0.0}) → EdgeInsetsGeometry

Available on BuildContext, provided by the FHUContextDirectionality extension

Creates RTL-aware directional margin.
logicalPadding({double start = 0.0, double end = 0.0, double top = 0.0, double bottom = 0.0}) → EdgeInsetsGeometry

Available on BuildContext, provided by the FHUContextDirectionality extension

Creates RTL-aware directional padding.