Set the space between Elements in Row Flutter

后端 未结 8 508
清酒与你
清酒与你 2021-01-30 06:20

Code:

new Container(
          alignment: FractionalOffset.center,
          child: new Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
             


        
8条回答
  •  北海茫月
    2021-01-30 07:04

    I believe the original post was about removing the space between the buttons in a row, not adding space.

    The trick is that the minimum space between the buttons was due to padding built into the buttons as part of the material design specification.

    So, don't use buttons! But a GestureDetector instead. This widget type give the onClick / onTap functionality but without the styling.

    See this post for an example.

    https://stackoverflow.com/a/56001817/766115

提交回复
热议问题