小编Ram*_*uam的帖子

如何对齐颤振列小部件中的文本?

我想垂直对齐左侧元素,并与带有填充的右侧元素相同,这就是我得到的结果,元素未对齐,并且我无法在第二行中插入填充,以便左侧元素对齐

在此输入图像描述

         return InkWell(
           child: Column(

            children: <Widget>[
               Row(
                 children:<Widget> [
                 Padding(padding:EdgeInsets.fromLTRB(18.0, 0.0, 0.0, 0.0)),

                 Text(
                 product.libelle,
                 style: theme.textTheme.title,
                 maxLines: 1,
                 textAlign: TextAlign.left,
                 ),]),


             Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children:<Widget> [
              Text(
              product.description,
              style: theme.textTheme.subtitle,
              maxLines: 1,

             ),
         RaisedButton( onPressed: () {},
         child: new Text("S\'abonner"),
         )

       ]),
       ),
         );
Run Code Online (Sandbox Code Playgroud)

flutter

6
推荐指数
2
解决办法
1万
查看次数

如何在颤振中对齐左侧或右侧的列子窗口小部件?

我想在列小部件的左侧放置一些文本小部件,我尝试将 textAlign 属性添加到文本中,但它不起作用:

           Column(
             children: <Widget>[
             Text("some text",textAlign:TextAlign.left),
           ])
Run Code Online (Sandbox Code Playgroud)

flutter

1
推荐指数
1
解决办法
3785
查看次数

标签 统计

flutter ×2