-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdemo_button.dart
57 lines (52 loc) · 1.38 KB
/
demo_button.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import 'package:flutter/material.dart';
class DemoButton extends StatefulWidget {
@override
_DemoButtonState createState() => _DemoButtonState();
}
class _DemoButtonState extends State<DemoButton> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("九点下班"),
),
body: Center(
child: Column(
children: <Widget>[
/// Material Design风格的Button
RaisedButton(
onPressed: () {},
color: Colors.greenAccent,
child: Text(
'RaisedButton',
style: TextStyle(color: Colors.black),
),
),
/// 扁平的 Button
FlatButton(
onPressed: () {},
color: Colors.red,
child: Text(
"FlatButton",
style: TextStyle(color: Colors.white),
),
),
/// 带边框的 Button
OutlineButton(
onPressed: () {},
child: Text(
"OutlineButton",
style: TextStyle(color: Colors.blue),
),
),
IconButton(
onPressed: () {},
color: Colors.deepOrange,
icon: Icon(Icons.headset),
),
],
),
),
);
}
}