-
Notifications
You must be signed in to change notification settings - Fork 72
/
Copy pathclay_containers.dart
107 lines (104 loc) · 3.29 KB
/
clay_containers.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
102
103
104
105
106
107
import 'package:flutter/material.dart';
import 'package:clay_containers/clay_containers.dart';
class MyClayContainers extends StatelessWidget {
const MyClayContainers({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
var baseColor = Colors.deepPurple[100];
return Scaffold(
backgroundColor: baseColor,
appBar: AppBar(title: const Text('Clay Containers')),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
ClayContainer(
color: baseColor,
height: 100,
width: 100,
),
const SizedBox(height: 30),
ClayContainer(
color: baseColor,
child: Padding(
padding: const EdgeInsets.all(20),
child: ClayText(
"Hi!",
emboss: true,
size: 46,
textColor: Colors.deepPurple,
),
),
),
const SizedBox(height: 30),
ClayContainer(
color: baseColor,
height: 100,
width: 100,
borderRadius: 50,
),
const SizedBox(height: 30),
ClayContainer(
color: baseColor,
height: 100,
width: 100,
customBorderRadius: const BorderRadius.only(
topRight: Radius.elliptical(150, 150),
bottomLeft: Radius.circular(50)),
),
const SizedBox(height: 30),
ClayContainer(
emboss: true,
color: baseColor,
height: 100,
width: 100,
borderRadius: 50,
),
const SizedBox(height: 30),
ClayContainer(
color: baseColor,
height: 100,
width: 100,
borderRadius: 75,
depth: 40,
spread: 40,
),
const SizedBox(height: 30),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
ClayContainer(
color: baseColor,
height: 80,
width: 80,
borderRadius: 75,
curveType: CurveType.concave,
),
const SizedBox(width: 30),
ClayContainer(
color: baseColor,
height: 80,
width: 80,
borderRadius: 75,
curveType: CurveType.none,
),
const SizedBox(width: 30),
ClayContainer(
color: baseColor,
height: 80,
width: 80,
borderRadius: 75,
curveType: CurveType.convex,
),
],
),
const SizedBox(height: 30),
],
),
),
),
);
}
}