Skip to content
pubscout

flutter_bidi_text

2.0.0, released 4 months ago by an unverified publisher

Text widgets with automatic bidirectional text direction detection for multilingual apps.

WASM-ready
$ flutter pub add flutter_bidi_text
Source repository

What it does

Provides drop-in replacements for standard Flutter text widgets (Text, RichText, TextField, etc.) that automatically detect and apply the correct text direction (LTR or RTL) based on the content. It also includes helper utilities to estimate text direction programmatically.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Your application handles multilingual text content where users mix right-to-left and left-to-right languages.
  • You want drop-in text input and display widgets that handle text direction automatically without manual intervention.

Skip it when

  • Your application only supports a single left-to-right or right-to-left language.
  • You rely heavily on `is Text` or `is TextField` type checks on these specific widgets.

Strengths

  • Automatic detection of RTL/LTR content including mixed text.
  • Drop-in replacements for standard Flutter text and input widgets.
  • Includes helper utilities for standalone direction estimation.

Weaknesses

  • Widgets use composition instead of inheritance in v2.0.0, breaking existing `is Text` type checks.
  • Performance might be impacted on very long text if sampling length is set to analyze the entire string.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:flutter_bidi_text/flutter_bidi_text.dart';

BidiText('مرحبا بالعالم');

BidiTextField(
  decoration: InputDecoration(hintText: 'Enter text'),
  onDirectionChanged: (TextDirection direction) {
    print('Text direction changed to: $direction');
  },
);

Alternatives

Packages that do the same job and could replace flutter_bidi_text.

  • styled_text

    Text widget with formatted text using tags for easier multilingual styling.