import 'package:flutter/material.dart';
// import 'package:english_words/english_words.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
appBar: new AppBar(
title: new Text('Welcome to Flutter12'),
),
body: Column(
children: [
RaisedButton(
child: Text('RaisedButton'),
onPressed: () => {
print('测试机哦')
}),
FlatButton(
onPressed: () => {
print('FlatButton')
},
child: Text('FlatButton')
),
OutlineButton(
onPressed: () => {
print('OutlineButton')
},
child: Text('OutlineButton'),
color: Colors.redAccent,
textColor: Colors.blue,
highlightColor: Colors.amberAccent,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
)
],
),
),
);
}
}
https://www.jianshu.com/p/f06cc6c74d20