Skip to content

Instantly share code, notes, and snippets.

@1000copy
Created August 30, 2019 10:08
Show Gist options
  • Save 1000copy/1317c49dd0ef143f4ce57f221b2fc609 to your computer and use it in GitHub Desktop.
Save 1000copy/1317c49dd0ef143f4ce57f221b2fc609 to your computer and use it in GitHub Desktop.
//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