Created
August 30, 2019 10:08
-
-
Save 1000copy/1317c49dd0ef143f4ce57f221b2fc609 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//add image https://stackoverflow.com/questions/50903106/how-to-add-image-in-flutter | |
// add button:FlatButton | |
// layout column | |
// color | |
// button radius rect | |
// set button width | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final wordPair = WordPair.random(); | |
return MaterialApp( | |
title: 'Welcome to Flutter', | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text('Welcome to Flutter'), | |
), | |
body: Center( | |
child:Column( | |
children: <Widget>[ | |
Container( | |
color: Colors.red, | |
child: Image.asset('assets/images/g.jpg'), | |
), | |
Container( | |
color: Colors.blue, | |
child:Text("一个产品\n欢迎你"), | |
), | |
new SizedBox( | |
width:300, | |
child: new FlatButton( | |
child: Text("体验一下"), | |
color:Colors.red, | |
shape: new RoundedRectangleBorder( | |
borderRadius: new BorderRadius.circular(30.0), | |
), | |
onPressed: () {}, | |
) | |
), | |
Container( | |
color: Colors.blue, | |
child:Text("其他方式登录"), | |
), | |
Container( | |
color: Colors.blue, | |
child:Text("微信·支付宝"), | |
), | |
Container( | |
color: Colors.blue, | |
child:Text("登录就意味着你认了"), | |
), | |
new Text("服务热线00001111"), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment