forked from anncode1/Curso-de-Flutter-Avanzado-en-Platzi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard_image.dart
50 lines (40 loc) · 1.01 KB
/
card_image.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
import 'package:flutter/material.dart';
import 'floating_action_button_green.dart';
class CardImage extends StatelessWidget {
String pathImage = "assets/img/beach.jpeg";
CardImage(this.pathImage);
@override
Widget build(BuildContext context) {
// TODO: implement build
final card = Container(
height: 350.0,
width: 250.0,
margin: EdgeInsets.only(
top: 80.0,
left: 20.0
),
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(pathImage)
),
borderRadius: BorderRadius.all(Radius.circular(10.0)),
shape: BoxShape.rectangle,
boxShadow: <BoxShadow>[
BoxShadow (
color: Colors.black38,
blurRadius: 15.0,
offset: Offset(0.0, 7.0)
)
]
),
);
return Stack(
alignment: Alignment(0.9,1.1),
children: <Widget>[
card,
FloatingActionButtonGreen()
],
);
}
}