-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrink_card.dart
53 lines (50 loc) · 1.16 KB
/
drink_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
import 'package:flutter/material.dart';
class DrinkCard extends StatelessWidget {
const DrinkCard({
super.key,
required this.title,
required this.image,
});
final String title;
final String image;
@override
Widget build(
BuildContext context,
) {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 140,
height: 140,
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: Colors.grey.shade600,
spreadRadius: 1,
blurRadius: 5,
),
BoxShadow(
color: Colors.grey.shade300,
)
],
image: DecorationImage(
image: NetworkImage(image),
fit: BoxFit.cover,
),
),
),
const SizedBox(height: 8.0),
Text(
title,
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
textAlign: TextAlign.center,
),
],
);
}
}