@@ -6,6 +6,7 @@ class Index extends StatefulWidget {
66}
77
88class _IndexState extends State <Index > {
9+ var params = 0.0 ;
910 @override
1011 void initState () {
1112 super .initState ();
@@ -18,7 +19,104 @@ class _IndexState extends State<Index> {
1819 title: Text ('RaisedButton' ),
1920 ),
2021 body: Center (
21- child: Text ('更新中' ),
22+ child: Wrap (
23+ alignment: WrapAlignment .spaceEvenly,
24+ children: < Widget > [
25+ RaisedButton (
26+ onPressed: () {
27+ setState (() {
28+ params == 0.0 ? params = 10.0 : params = 0.0 ;
29+ });
30+ },
31+ child: Text ('BeveledRectangleBorder' ),
32+ textColor: Colors .white,
33+ textTheme: ButtonTextTheme .normal,
34+ color: Theme .of (context).primaryColor,
35+ splashColor: Colors .pink,
36+ highlightColor: Colors .pink,
37+ elevation: 2.0 ,
38+ highlightElevation: 8.0 ,
39+ padding: EdgeInsets .all (10.0 ),
40+ shape: BeveledRectangleBorder (
41+ side: BorderSide (
42+ color: Colors .green
43+ ),
44+ borderRadius: BorderRadius .all (Radius .circular (params))
45+ )
46+ ),
47+ RaisedButton (
48+ onPressed: () {
49+ setState (() {
50+ params == 0.0 ? params = 10.0 : params = 0.0 ;
51+ });
52+ },
53+ child: Text ('RoundedRectangleBorder' ),
54+ textColor: Colors .white,
55+ textTheme: ButtonTextTheme .normal,
56+ color: Theme .of (context).primaryColor,
57+ splashColor: Colors .pink,
58+ highlightColor: Colors .pink,
59+ elevation: 2.0 ,
60+ highlightElevation: 8.0 ,
61+ padding: EdgeInsets .all (10.0 ),
62+ shape: RoundedRectangleBorder (
63+ side: BorderSide (
64+ color: Colors .green
65+ ),
66+ borderRadius: BorderRadius .circular (params)
67+ )
68+ ),
69+ RaisedButton (
70+ onPressed: () {
71+ setState (() {
72+ params == 0.0 ? params = 10.0 : params = 0.0 ;
73+ });
74+ },
75+ child: Text ('CircleBorder' ),
76+ textColor: Colors .white,
77+ textTheme: ButtonTextTheme .normal,
78+ color: Theme .of (context).primaryColor,
79+ splashColor: Colors .pink,
80+ highlightColor: Colors .pink,
81+ elevation: 2.0 ,
82+ highlightElevation: 8.0 ,
83+ padding: EdgeInsets .all (30.0 ),
84+ shape: CircleBorder (
85+ side: BorderSide (
86+ color: Colors .green
87+ ),
88+ )
89+ ),
90+ RaisedButton (
91+ onPressed: () {
92+ setState (() {
93+ params == 0.0 ? params = 10.0 : params = 0.0 ;
94+ });
95+ },
96+ child: Text ('StadiumBorder' ),
97+ textColor: Colors .white,
98+ textTheme: ButtonTextTheme .normal,
99+ color: Theme .of (context).primaryColor,
100+ splashColor: Colors .pink,
101+ highlightColor: Colors .pink,
102+ elevation: 2.0 ,
103+ highlightElevation: 8.0 ,
104+ padding: EdgeInsets .all (10.0 ),
105+ shape: StadiumBorder (
106+ side: BorderSide (
107+ color: Colors .green
108+ )
109+ )
110+ ),
111+ RaisedButton .icon (
112+ icon: Icon (Icons .android, size: 28.0 ,),
113+ label: Text ('RaisedButton.icon' ),
114+ onPressed: () {},
115+ textColor: Colors .white,
116+ color: Theme .of (context).primaryColor,
117+ )
118+ ],
119+ ),
22120 ),
23121 );
24122 }
0 commit comments