-
Notifications
You must be signed in to change notification settings - Fork 2
/
card.dart
101 lines (98 loc) · 3.12 KB
/
card.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import 'package:flutter/material.dart';
class CardExample extends StatefulWidget {
CardExample({Key key}) : super(key: key);
@override
_CardExampleState createState() => _CardExampleState();
}
class _CardExampleState extends State<CardExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
),
Card(
color: Colors.green,
child: Container(
padding: EdgeInsets.all(32.0),
child: Column(
children: <Widget>[
Text('Card Widget Example #1'),
],
),
),
),
Padding(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
),
Card(
color: Colors.orange,
elevation: 10,
child: Container(
padding: EdgeInsets.all(32.0),
child: Column(
children: <Widget>[
Text('Card Widget Example #2'),
],
),
),
),
Padding(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
),
Container(
height: 140,
child: Card(
color: Colors.blue,
margin: EdgeInsets.all(18),
elevation: 7.0,
child: Center(
child: Text("Card Widget Example #3"),
),
),
),
Padding(
padding: EdgeInsets.only(top: 10.0, bottom: 10.0),
),
Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
const ListTile(
leading: Icon(Icons.location_on),
title: Text('Nice place to visit'),
subtitle: Text('Card Widget Example #4'),
),
ButtonTheme.bar(
// make buttons use the appropriate styles for cards
child: ButtonBar(
children: <Widget>[
FlatButton(
child: const Text('VISIT'),
onPressed: () {
print("visit");
},
),
FlatButton(
child: const Text('DECLINE'),
onPressed: () {
print("decline");
},
),
],
),
),
],
),
),
],
),
),
),
);
}
}