Skip to content

Instantly share code, notes, and snippets.

@ryanlid
Created February 3, 2020 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanlid/6c8ff70f906541191df670f2ed9119a9 to your computer and use it in GitHub Desktop.
Save ryanlid/6c8ff70f906541191df670f2ed9119a9 to your computer and use it in GitHub Desktop.
FlatButton 扁平按钮 (点击时会产生阴影效果)
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