iOS颤振-如何调整字符串表情?

iOS颤振-如何调整字符串表情?,ios,flutter,alignment,Ios,Flutter,Alignment,在android设备上运行时,我的应用程序在下面的示例中没有遇到对齐问题。当我想在iOS设备上运行它时,我有以下对齐问题 有问题的对齐从这里开始。当我选择波斯语或阿拉伯语时,我的应用程序经历了完全对称的变化,一些表情正确对齐,而另一些则出现扭曲 我的代码: Widget build(BuildContext context) { return Scaffold( appBar: AppBar( backgroundColor: ortaMavi, leading: Ico

在android设备上运行时,我的应用程序在下面的示例中没有遇到对齐问题。当我想在iOS设备上运行它时,我有以下对齐问题

有问题的对齐从这里开始。当我选择波斯语或阿拉伯语时,我的应用程序经历了完全对称的变化,一些表情正确对齐,而另一些则出现扭曲

我的代码:

Widget build(BuildContext context) {
return Scaffold(
  appBar: AppBar(
    backgroundColor: ortaMavi,
    leading: IconButton(
        onPressed: () {
          Navigator.of(context).pop();
        },
        icon: Icon(
          Icons.arrow_back_ios,
          size: 20,
          color: Colors.white,
        )),
    title: Center(child: Text(titleHolder)),
    actions: <Widget>[
      Center(
        child: Container(
            margin: EdgeInsets.all(15),
            child: Text(
              flagHolder,
              style: TextStyle(fontSize: 25),
            )),
      )
    ],
  ),
  body: SafeArea(
    child: ListView.builder(
        padding: const EdgeInsets.symmetric(vertical: 5),
        itemCount: countries.length,
        itemBuilder: (BuildContext context, int index) {
          return GestureDetector(
            onTap: () {
              EasyLocalizationProvider.of(context)
                  .data
                  .changeLocale(langs[index]);
              setState(() {
                titleHolder = countries[index];
                flagHolder = flags[index];
                selectedLangIndex = index;
              });
            },
            child: Container(
              decoration: BoxDecoration(
                color:
                    selectedLangIndex != null && selectedLangIndex == index
                        ? ortaMavi.withOpacity(0.2)
                        : Colors.white,
                boxShadow: [
                  BoxShadow(
                    color: Colors.lightBlueAccent.withOpacity(0.5),
                    spreadRadius: 2,
                    blurRadius: 3,
                    offset: Offset(0, 3), // changes position of shadow
                  ),
                ],
              ),
              height: 50,
              child: Padding(
                padding: EdgeInsets.symmetric(horizontal: 15),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: <Widget>[
                    Text(
                      '${countries[index]}',
                      style: TextStyle(
                          fontSize: 20,
                          color: selectedLangIndex != null &&
                                  selectedLangIndex == index
                              ? Colors.white
                              : Colors.black),
                    ),
                    Text(
                      flags[index],
                      style: TextStyle(fontSize: 25),
                    )
                  ],
                ),
              ),
            ),
          );
        }),
  ),
);
小部件构建(构建上下文){
返回脚手架(
appBar:appBar(
背景颜色:ortaMavi,
领先:IconButton(
已按下:(){
Navigator.of(context.pop();
},
图标:图标(
Icons.arrow\u back\u ios,
尺码:20,
颜色:颜色,白色,
)),
标题:中心(子项:文本(标题持有者)),
行动:[
居中(
子:容器(
保证金:所有(15),
子:文本(
旗手,
样式:TextStyle(字体大小:25),
)),
)
],
),
正文:安全区(
子项:ListView.builder(
填充:常量边集。对称(垂直:5),
itemCount:countries.length,
itemBuilder:(构建上下文,int索引){
返回手势检测器(
onTap:(){
EasyLocalizationProvider.of(上下文)
.数据
.changeLocale(langs[index]);
设置状态(){
所有权人=国家[指数];
旗手=旗帜[索引];
selectedLangIndex=索引;
});
},
子:容器(
装饰:盒子装饰(
颜色:
selectedLangIndex!=null&&selectedLangIndex==index
奥塔马维,不透明度(0.2)
:颜色。白色,
boxShadow:[
箱形阴影(
颜色:颜色。浅蓝色调。不透明度(0.5),
扩展半径:2,
半径:3,
偏移量:偏移量(0,3),//更改阴影的位置
),
],
),
身高:50,
孩子:填充(
填充:边缘组。对称(水平:15),
孩子:排(
mainAxisAlignment:mainAxisAlignment.spaceBetween,
儿童:[
正文(
“${国家[指数]}”,
样式:TextStyle(
尺寸:20,
颜色:selectedLangIndex!=null&&
selectedLangIndex==索引
?颜色:白色
:颜色。黑色),
),
正文(
标志[索引],
样式:TextStyle(字体大小:25),
)
],
),
),
),
);
}),
),
);

}

您可以将标志字符串放入大小框中

SizedBox(
  width: 200.0,
  height: 200.0,
  child:Text(
        flags[index],
    ),
)

您可以将flags字符串放入SizedBox中

SizedBox(
  width: 200.0,
  height: 200.0,
  child:Text(
        flags[index],
    ),
)

如果可能的话,请分享你的代码。我将添加代码。您是否尝试使用
方向性
包装您的文本小部件?如果可能,请分享您的代码。我将添加代码。您是否尝试使用
方向性
包装文本小部件?