How to align a Column's child to the bottom

后端 未结 4 2307
后悔当初
后悔当初 2021-02-18 14:30

I\'m trying to build a generic home page and I want to align the last child of my column (which contains all the widgets for the page) to the bottom of the screen but the widget

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-18 15:07

    If you are flexible to change column to a stack, you can do the following.

    body: Container(
        child: Stack(children: [
          Text('Text 1'),
          Text('Text 2'),
          Align(
            alignment: Alignment.bottomCenter,
            child: Text(
              "Text in bottom",
            ),
          ),
        ]),
      ),
    

提交回复
热议问题