Advanced Usage

Using ArabicJustifiedRichText

⚠️ Important: ArabicJustifiedRichText currently does not support WidgetSpan. If your text contains widgets (icons, images, etc.), the Kashida justification will be disabled and it will fall back to standard RichText rendering.

For complex text with multiple styles, colors, or interactions:

ArabicJustifiedRichText(
  enableKashida: true,
  textSpan: TextSpan(
    style: TextStyle(fontSize: 18),
    children: [
      TextSpan(text: 'النص العادي '),
      TextSpan(
        text: 'النص العريض',
        style: TextStyle(fontWeight: FontWeight.bold, color: Colors.blue),
      ),
      TextSpan(text: ' المزيد من النص'),
    ],
  ),
)