0

I have set locale of flutter to

Locale("ur","PK")

now i have api from which urdu text is coming, but the problem is that these text have brackets and they are being displayed inverted like ) some text (. Any one know solution for it?

Edit: I will share screen shot and code for context. enter image description here

Directionality(
    textDirection: TextDirection.rtl,
    child: Text(
    quranScreenController.selectedSurah
    .trAyat[index].text,
    TextOverflow.ellipsis,
    textAlign: lang == "ur"
    ? TextAlign.right
    : TextAlign.justify,
    style: TextStyle(
        fontFamily: lang == "ur"
        ? "j_n_n"
        : "Poppins",
        wordSpacing: 2,
        fontSize:
        lang == "ur" ? 27.sp : 16.sp,
        fontWeight: FontWeight.w500,
    ),
),
),

1 Answers1

0

I'm not sure I totally get the question right, but I have dealt with Arabic language using the Directionality property.

Just use Directionality as A parent, and use the textDirection: TextDirection.rtl inside it so you can see it rtl or ltr.

Edit 1: I believe this answers your question https://stackoverflow.com/a/44649112/11532698