1. import 'package:flutter/material.dart';
    2. // import 'package:english_words/english_words.dart';
    3. void main() => runApp(new MyApp());
    4. class MyApp extends StatelessWidget {
    5. @override
    6. Widget build(BuildContext context) {
    7. return new MaterialApp(
    8. title: 'Welcome to Flutter',
    9. home: new Scaffold(
    10. appBar: new AppBar(
    11. title: new Text('Welcome to Flutter12'),
    12. ),
    13. body: Column(
    14. children: [
    15. RaisedButton(
    16. child: Text('RaisedButton'),
    17. onPressed: () => {
    18. print('测试机哦')
    19. }),
    20. FlatButton(
    21. onPressed: () => {
    22. print('FlatButton')
    23. },
    24. child: Text('FlatButton')
    25. ),
    26. OutlineButton(
    27. onPressed: () => {
    28. print('OutlineButton')
    29. },
    30. child: Text('OutlineButton'),
    31. color: Colors.redAccent,
    32. textColor: Colors.blue,
    33. highlightColor: Colors.amberAccent,
    34. shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
    35. )
    36. ],
    37. ),
    38. ),
    39. );
    40. }
    41. }

    https://www.jianshu.com/p/f06cc6c74d20