forked from anncode1/Curso-de-Flutter-Avanzado-en-Platzi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile_place_info.dart
98 lines (88 loc) · 2.37 KB
/
profile_place_info.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
import 'package:flutter/material.dart';
import 'place.dart';
import 'floating_action_button_green.dart';
class ProfilePlaceInfo extends StatelessWidget {
Place place;
ProfilePlaceInfo(this.place);
@override
Widget build(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width;
final place = Text(
this.place.name,
style: TextStyle(
fontFamily: 'Lato',
fontSize: 20.0,
fontWeight: FontWeight.bold
),
);
final placeInfo = Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
this.place.where,
style: TextStyle(
color: Color.fromRGBO(0, 0, 0, 0.4),
fontFamily: 'Lato',
fontSize: 12.0,
fontWeight: FontWeight.bold
),
),
Text(
this.place.type,
style: TextStyle(
color: Color.fromRGBO(0, 0, 0, 0.4),
fontFamily: 'Lato',
fontSize: 12.0,
fontWeight: FontWeight.bold
),
)
]
)
);
final steps = Text(
'Steps ${this.place.steps}',
style: TextStyle(
fontFamily: 'Lato',
fontSize: 14.0,
fontWeight: FontWeight.bold,
color: Colors.amber
),
);
final card = Container(
width: screenWidth * 0.65,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
color: Colors.white,
boxShadow: <BoxShadow>[
BoxShadow(
color: Colors.black38,
blurRadius: 10.0,
offset: Offset(0.0, 5.0)
)
]
),
child: Padding(
padding: EdgeInsets.all(15.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
place,
placeInfo,
steps
],
)
),
);
return Stack(
alignment: Alignment(0.8, 1.25),
children: <Widget>[
card,
FloatingActionButtonGreen()
],
);
}
}