I would like to display both of my buttons next to each other horizontally. So far I can only display them from top to bottom.
With the following code, what would I have to change ?
new Container( child: new Column( children: <Widget>[ new RaisedButton( child: new Text("LogIn"), color: Colors.blueAccent[600], onPressed: null, ), new RaisedButton( child: new Text("SignUp"), color: Colors.blueAccent[600], onPressed: null, ), ], ), ),
Use Wrap() widget to add multiple floating action buttons.
Here's how you do it: Step 1: Wrap the Stack's child widget inside the Position widget. Step 2: Inside the Position widget, add the top , right , bottom , left property and give it a value. For example, setting top:15 and right:0 will position a widget on the top right of your screen with 15 px space from the top.
Column
is for items vertically arranged (hence a column), you are looking for Row
. Just replace Column
with Row
, the rest of the code is fine. You can also use an Expanded
if you want to fill all the available space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With