-
Notifications
You must be signed in to change notification settings - Fork 2
/
icon_card.dart
41 lines (38 loc) · 1.1 KB
/
icon_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
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../../../constants.dart';
class IconCard extends StatelessWidget {
const IconCard({
Key? key,
required this.icon,
}) : super(key: key);
final String icon;
@override
Widget build(BuildContext context) {
Size size = MediaQuery.of(context).size;
return Container(
margin: EdgeInsets.symmetric(vertical: size.height * 0.03),
padding: const EdgeInsets.all(kDefaultPadding / 2),
height: 62,
width: 62,
decoration: BoxDecoration(
color: kBackgroundColor,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
offset: const Offset(0, 15),
blurRadius: 22,
color: kPrimaryColor.withOpacity(0.22),
),
const BoxShadow(
offset: Offset(-15, -15),
blurRadius: 20,
color: Colors.white,
),
],
),
// child: SvgPicture.asset(icon),
child: SvgPicture.asset(icon),
);
}
}