راکت

جاستیفای کردن متن فارسی در فلاتر

3 پاسخ

@hesammousavi
سلام
چطوری میتونم متن فارسی رو جاستیفای کنم؟
این کد منه :

new Text(
    ' - ' + txt2,
     textAlign: TextAlign.justify,
     style: new TextStyle(fontSize: 16),
)

ولی خب اینجوری میشه : http://s8.picofile.com/file/8358695600/Capture.PNG
باید چیکار کنم متن بیاد سمت راست؟

ثبت پرسش جدید

پاسخ‌ها

3
محمد امیر محمدی
محمد امیر محمدی
@mem.amir.m

تخصص: برنامه نویس لاراول و ویو جی اس

پدر ویجت Scaffold رو Directionality بذار و مقدار textDirection اش رو rtl بذار.

 @override
  Widget build(BuildContext context) {
    return new Directionality(
      textDirection: TextDirection.rtl,
      child: new Scaffold(
        appBar: new AppBar(
          title: new Text(ttrtl2),
        ),
        body: new Padding(
          padding: const EdgeInsets.only(right: 10.0),
          child: new Text(
    ' - ' + txt2,
     textAlign: TextAlign.justify,
     style: new TextStyle(fontSize: 16),
) ),
        ),
      ),
    );
  }
الیاس سخاوتی نیا
الیاس سخاوتی نیا
@elyassir

تخصص: علاقه‌مند به برنامه‌‎نویسی

@mem.amir.m
نه متاسفانه نشد!
کسی راه دیگه ای بلد نیست؟

mahdi allahveran
mahdi allahveran
@mahdipixeldeveloper
Text(
              _product.description,
              style: TextStyle(
                fontFamily: "Vazir",
                color: Colors.black54,
                fontSize: 14,
              ),
              textDirection: TextDirection.rtl,
              textAlign: TextAlign.justify,
            ),

ببینید درست میشه یا نه.

برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام