-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuttonsdemo
83 lines (81 loc) · 2.5 KB
/
buttonsdemo
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: Scaffold(
appBar: AppBar(
title: Text('Material App Bar'),
),
body: Center(
child: Column(
children: <Widget>[
RaisedButton(
child: Text('Raised'),
onPressed: () {
print('I just click');
}),
OutlineButton(
child: Text('Outline'),
onPressed: () {
print('I just click');
}),
FlatButton(
onPressed: () {
print('I just click');
},
child: Text('Flat')),
IconButton(
icon: Icon(
Icons.home,
color: Colors.green,
),
onPressed: () {
print('I just click');
}),
Container(
width: 200,
height: 50,
child: RaisedButton.icon(
color: Colors.blue,
onPressed: () {
print('I just click');
},
icon: Icon(
Icons.home,
color: Colors.amber,
),
label: Text(
'Raised Button Icon',
style: TextStyle(color: Colors.white),
),
),
),
InkWell(
child: Image.network(
'https://flutter.dev/assets/flutter-lockup-1caf6476beed76adec3c477586da54de6b552b2f42108ec5bc68dc63bae2df75.png',
width: 200,
height: 200,
),
onTap: () {
print('I click');
},
),
InkWell(
child: Container(
width: 200,
height: 40,
color: Colors.amberAccent,
),
onTap: () {
print('I click');
},
),
],
),
)),
);
}
}