Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 颤振如何右对齐最后一列_Flutter_Flutter Layout - Fatal编程技术网

Flutter 颤振如何右对齐最后一列

Flutter 颤振如何右对齐最后一列,flutter,flutter-layout,Flutter,Flutter Layout,在flatter中,如何使第三列填充宽度?我正在尝试右对齐编辑图标 Row( children: [ Column( children: [ SizedBox(width: 10) ] ), Column( children: [ Text("example") ] ), Column( children: [ IconBut

在flatter中,如何使第三列填充宽度?我正在尝试右对齐编辑图标

Row(
      children: [
        Column(
          children: [ SizedBox(width: 10) ]
        ),
        Column(
          children: [ Text("example") ]
        ),
        Column(
          children: [ IconButton(icon: Icon(Icons.edit)) ],
        ),
      ],
    );

我尝试过的所有方法,例如将其放入
Expanded()
IntrinsicWidth()
列(…,crossAxisAlignment:crossAxisAlignment.stretch)
都会导致“无法命中测试从未布置过的渲染框”。

放置
间隔器()
上一列之前列

对齐
包装您的列,然后
展开
,然后设置
对齐:对齐。右中
. 这将使您能够灵活地将小部件放置在任何您想要的位置。
从颤振文档中查看

Row(
              children: [
                Column(children: [SizedBox(width: 10)]),
                Column(children: [Text("example")]),
                Expanded(
                  child: Align(
                    alignment: Alignment.centerRight,
                    child: Column(
                      children: [
                        IconButton(
                          icon: Icon(Icons.edit),
                          onPressed: () {},
                        )
                      ],
                    ),
                  ),
                ),
              ],
            ),