Flutter Web Persian/Arabic Strings Not Showing Properly on the UI

Viewed 604

I just started to migrate to Flutter web and just at the start point, encountered this strange problem. When using Persian/Arabic Characters in code, it would be shown improperly on the UI. Other Characters are shown nice.

Flutter Default Sample App

environment:
  sdk: ">=2.7.0 <3.0.0"

Code:

 children: <Widget>[
            Text(
              'You have pressed the button this many times:',
              style: Theme.of(context).textTheme.headline4,
            ),
            Text(
              'شما این دکمه را این تعداد بار فشار داده اید:',
              style: Theme.of(context).textTheme.headline4,
            ),
            Text(
              'ñĚĖĎÆß',
              style: Theme.of(context).textTheme.headline4,
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ], 

The Project and System Encoding are set to UTF-8.

Result: enter image description here

2 Answers

please remove the style in arabic text

Text(
 'شما این دکمه را این تعداد بار فشار داده اید:',          
),

their is fontwidth in style is the problem you getting error ( [][][][] )

Related