final TextDirection currentDirection = Directionality.of(context); final bool isRTL = currentDirection == TextDirection.rtl;