forked from anncode1/Curso-de-Flutter-Avanzado-en-Platzi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreview.dart
108 lines (82 loc) · 1.91 KB
/
review.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
108
import 'package:flutter/material.dart';
class Review extends StatelessWidget {
String pathImage = "assets/img/people.jpg";
String name = "Varuna Yasas";
String details = "1 review · 5 photos";
String comment = "There is an amazing place in Sri Lanka";
Review(this.pathImage, this.name, this.details, this.comment);
@override
Widget build(BuildContext context) {
// TODO: implement build
final userComment = Container(
margin: EdgeInsets.only(
left: 20.0
),
child: Text(
comment,
textAlign: TextAlign.left,
style: TextStyle(
fontFamily: "Lato",
fontSize: 13.0,
fontWeight: FontWeight.w900
),
),
);
final userInfo = Container(
margin: EdgeInsets.only(
left: 20.0
),
child: Text(
details,
textAlign: TextAlign.left,
style: TextStyle(
fontFamily: "Lato",
fontSize: 13.0,
color: Color(0xFFa3a5a7)
),
),
);
final userName = Container(
margin: EdgeInsets.only(
left: 20.0
),
child: Text(
name,
textAlign: TextAlign.left,
style: TextStyle(
fontFamily: "Lato",
fontSize: 17.0
),
),
);
final userDetails = Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
userName,
userInfo,
userComment
],
);
final photo = Container (
margin: EdgeInsets.only(
top: 20.0,
left: 20.0
),
width: 80.0,
height: 80.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(pathImage)
)
),
);
return Row (
children: <Widget>[
photo,
userDetails
],
);
}
}