just I want to change direction of labelText
to RTL in below code:
new TextField( textAlign: TextAlign.right, controller: _textEdittingControler_bookName, autofocus: true, decoration: new InputDecoration( labelText: "افزودن کتاب", hintText: "نام کتاب را وارد کنید" ), )
To change the rendering direction from right to left, wrap the SfDataGrid widget inside the Directionality widget and set the textDirection property as TextDirection. rtl.
TextAlign. justify horizontally justifies the text over its container. textDirection: textDirection is used to specify the direction of the text inside a Text Widget say ltr (left-to-right) or rtl (right to left). ltr is the default text direction.
Simply use Directionality:
new Directionality( textDirection: TextDirection.rtl, child: TextField( textAlign: TextAlign.right, controller: _textEdittingControler_bookName, autofocus: true, decoration: new InputDecoration( labelText: "افزودن کتاب", hintText: "نام کتاب را وارد کنید" ), )
Directionality's docs
Can be used textAlign
TextFormField( textAlign: TextAlign.right, decoration: InputDecoration( hintText: 'ادخل تفاصيل الكتابة الخاصة بك', ),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With