0

I set title of Actionbar in Scaffold a Persian word :

new Scaffold(
      appBar: new AppBar(
        title: new Text('لغت نامه'),
        centerTitle: true,
        actions: <Widget>[
          new Icon(Icons.settings)
        ],
      ))  

but get this: An ellipsis title
title get ellipsis

I don't have any idea why this is happening. How can I prevent this?

this Persian title has 8 alphabet, if I set the title in English with the same size, no problem occurs, the problem is with Persian alphabet.

Workaround
I put 3 space before and after the Persian text: '\u0020\u0020\u0020لغت نامه\u0020\u0020\u0020'

3 space before and after text

Mneckoee
  • 2,802
  • 6
  • 23
  • 34

2 Answers2

0
MaterialApp(
  home: Scaffold(
    body: Center(
      child: SizedBox(
        width: double.infinity,
        child: Text(
          [your_text],
          textAlign: TextAlign.center,
        ),
      ),
    ),
  ),
Soha
  • 9
  • 2
-1

Try to change the width size of scaffold view in xml. It's displaying only half of the text which you have given in the program.

GS7
  • 1
  • 7