Set the space between Elements in Row Flutter

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

Code:

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


        
8条回答
  •  生来不讨喜
    2021-01-30 06:55

    Just add "Container(width: 5, color: Colors.transparent)," between elements

    new Container(
          alignment: FractionalOffset.center,
          child: new Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              new FlatButton(
                child: new Text('Don\'t have an account?', style: new TextStyle(color: Color(0xFF2E3233))),
              ),
                Container(width: 5, color: Colors.transparent),
              new FlatButton(
                child: new Text('Register.', style: new TextStyle(color: Color(0xFF84A2AF), fontWeight: FontWeight.bold),),
                onPressed: moveToRegister,
              )
            ],
          ),
        ),  
    

提交回复
热议问题