Skip to content

Commit b4e8da8

Browse files
authored
Add files via upload
1 parent a9957f2 commit b4e8da8

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

Diff for: CapsuleButton.dart

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import 'package:flutter/material.dart';
2+
3+
void main() {
4+
runApp(new MyApp());
5+
}
6+
7+
class MyApp extends StatelessWidget {
8+
@override
9+
Widget build(BuildContext context) {
10+
return new MaterialApp(
11+
home: new UserOptions(), // Default or main screen of the app
12+
);
13+
}
14+
}
15+
16+
class UserOptions extends StatefulWidget {
17+
@override
18+
State<StatefulWidget> createState() {
19+
return new UserOptionsState();
20+
}
21+
}
22+
23+
class UserOptionsState extends State<UserOptions> {
24+
@override
25+
Widget build(BuildContext context) {
26+
return new Scaffold(
27+
//backgroundColor: Colors.blueGrey,
28+
body: new Center(
29+
child: new Container(
30+
child: new Column(
31+
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
32+
children: <Widget>[
33+
new Builder(
34+
builder: (BuildContext context) {
35+
return new Material(
36+
borderRadius: new BorderRadius.circular(30.0),
37+
child: new Material(
38+
elevation: 5.0,
39+
child: new MaterialButton(
40+
//padding: new EdgeInsets.all(16.0),
41+
minWidth: 150.0,
42+
onPressed: () {
43+
Scaffold.of(context).showSnackBar(new SnackBar(
44+
content: new Text('You clicked manual'),
45+
));
46+
},
47+
child: new Text('Go manual'),
48+
color: Colors.lightBlueAccent,
49+
),
50+
),
51+
);
52+
},
53+
),
54+
new Builder(
55+
builder: (BuildContext context) {
56+
return new Material(
57+
borderRadius: new BorderRadius.circular(30.0),
58+
child: new Material(
59+
elevation: 5.0,
60+
child: new MaterialButton(
61+
minWidth: 150.0,
62+
onPressed: () {
63+
Scaffold.of(context).showSnackBar(new SnackBar(
64+
content: new Text('You clicked pro'),
65+
));
66+
},
67+
child: new Text('Go Pro'),
68+
color: Colors.lightBlueAccent,
69+
),
70+
),
71+
);
72+
},
73+
)
74+
],
75+
),
76+
77+
)),
78+
);
79+
}
80+
}

0 commit comments

Comments
 (0)