isRtl property

  1. @useResult
bool get isRtl

Whether the current text direction is right-to-left.

Example usage:

void example(BuildContext context) {
  final bool rtl = context.isRtl;
  assert(rtl == true || rtl == false);
}

void main() {}

Implementation

@useResult
bool get isRtl => Directionality.of(this) == TextDirection.rtl;