Advertisement
CyanBlob

Flutter positioning and button sizing

Apr 11th, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.46 KB | None | 0 0
  1.     return new MaterialApp(
  2.       title: "Test",
  3.       home: new Scaffold(
  4.         body: new Center(
  5.           child: new Column(
  6.             mainAxisAlignment: MainAxisAlignment.center,
  7.             children: <Widget>[
  8.               new Container(
  9.                 padding: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0),
  10.                 child: new Text("Please login to continue"),
  11.               ),
  12.               new Container(
  13.                 padding: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0),
  14.                 child: new FlatButton(
  15.                   child: new Container(
  16.                     child: new Center(
  17.                       child: new Text("Google"),
  18.                     ),
  19.                     width: 150.0,
  20.                     height: 40.0
  21.                   ),
  22.                   color: Colors.red,
  23.                   onPressed: () {_googleLogin();},
  24.                 )
  25.               ),
  26.               new Container(
  27.                 padding: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0),
  28.                 child: new FlatButton(
  29.                   child: new Container(
  30.                     child: new Center(
  31.                       child: new Text("Facebook"),
  32.                     ),
  33.                     width: 150.0,
  34.                     height: 40.0
  35.                   ),
  36.                   color: Colors.blue,
  37.                   onPressed: () {_facebookLogin();},
  38.                 )
  39.               )
  40.             ],
  41.           )
  42.         )
  43.       )
  44.     );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement