FLUTTER | Right Align not working

前端 未结 3 634
梦谈多话
梦谈多话 2021-02-18 16:54

Trying to right align a container with text view child, it has a row parent which is inside another column, tried number of solutions from Stack Overflow, didn\'t work.

3条回答
  •  时光取名叫无心
    2021-02-18 17:54

    Use Spacer which will get remaining space and will divide the widget equally

         Row(
            children: [
              Text("Text 1", style: TextStyle(fontSize: 20),),
              Spacer(),
              Text("Text 2", style: TextStyle(fontSize: 20),),
              Spacer(),
              Text("Text 3", style: TextStyle(fontSize: 20),),
            ],
          ),
    

    Output:

提交回复
热议问题