Created
February 3, 2020 06:09
-
-
Save ryanlid/6c8ff70f906541191df670f2ed9119a9 to your computer and use it in GitHub Desktop.
FlatButton 扁平按钮
(点击时会产生阴影效果)
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: "FlatButton 扁平按钮组件", | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("FlatButton 扁平按钮组件"), | |
), | |
body: Center( | |
child: FlatButton( | |
onPressed: () {}, | |
child: Text( | |
"FlatButton 扁平按钮", | |
style: TextStyle(fontSize: 24.0), | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment