forked from Nabinji/100-DaysOf-Futter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
work.dart
219 lines (212 loc) · 6.97 KB
/
work.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
import 'package:flutter/material.dart';
import 'package:user_profile_page/Util/colors.dart';
import 'package:user_profile_page/user_profile_page.dart';
class Work extends StatefulWidget {
const Work({super.key});
@override
State<Work> createState() => _UserProfilePageState();
}
class _UserProfilePageState extends State<Work> {
int selectedIndex = 1;
void onItemsSelected(int index) {
setState(() {
selectedIndex = index;
});
if (index == 0) {
Navigator.push(context,
MaterialPageRoute(builder: (context) => const UserProfilePage()));
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color.fromARGB(255, 219, 240, 255),
body: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 80, left: 17, right: 17),
child: Container(
height: 300,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(20)),
child: Row(
children: [
const SizedBox(
width: 5,
),
// for name email , date of birth and address
Padding(
padding: const EdgeInsets.only(top: 25, left: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Software \nEngineer",
style: TextStyle(
fontSize: 45, height: 0.9, color: primaryColor),
),
const SizedBox(
height: 12,
),
const Text(
"Type",
style: TextStyle(color: Colors.black45),
),
Text(
"Senior Engineer",
style: TextStyle(
fontSize: 20, height: 0.9, color: primaryColor),
),
const SizedBox(
height: 12,
),
const Text(
"Joined",
style: TextStyle(color: Colors.black45),
),
Text(
"sep 2022",
style: TextStyle(
fontSize: 20, height: 0.9, color: primaryColor),
),
const SizedBox(
height: 12,
),
const Text(
"Experience",
style: TextStyle(color: Colors.black45),
),
Text(
"4 Years",
style: TextStyle(
fontSize: 20, height: 0.9, color: primaryColor),
),
],
),
),
const SizedBox(
width: 15,
),
// For profile image
Container(
width: 190,
height: 290,
decoration: BoxDecoration(
image: const DecorationImage(
image: AssetImage("Image/profile1.png"),
fit: BoxFit.fill),
borderRadius: BorderRadius.circular(20)),
),
],
),
),
),
const SizedBox(
height: 25,
),
Container(
height: 40,
width: 280,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(20)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
builderItem(0, "About"),
builderItem(1, "Work"),
builderItem(2, "Activity"),
],
),
),
// for work object
projects("17","Project \n done","92%","Success\n rate"),
projects("5","Teams","243","Clients\nreports")
],
),
);
}
Padding projects(number, name, number1, name1) {
return Padding(
padding: const EdgeInsets.only(top: 20, left: 17, right: 17),
child: Row(
children: [
Expanded(
child: Container(
height: 200,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(20)),
child: Stack(
children: [
Positioned(
top: 15,
left: 50,
child: Text(
number,
style: TextStyle(fontSize: 65, color: primaryColor),
)),
Positioned(
top: 95,
left: 50,
child: Text(
name,
style: TextStyle(fontSize: 28, color: Colors.black38),
))
],
),
),
),
const SizedBox(
width: 17,
),
Expanded(
child: Container(
height: 200,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(20)),
child: Stack(
children: [
Positioned(
top: 15,
left: 50,
child: Text(
number1,
style: TextStyle(fontSize: 65, color: primaryColor),
)),
Positioned(
top: 95,
left: 50,
child: Text(
name1,
style: TextStyle(fontSize: 28, color: Colors.black38),
))
],
),
),
),
],
),
);
}
GestureDetector builderItem(int index, String label) {
bool isSelected = index == selectedIndex;
return GestureDetector(
onTap: () {
onItemsSelected(index);
},
child: Container(
width: 85,
height: 30,
decoration: BoxDecoration(
color: isSelected ? Colors.blue : Colors.transparent,
borderRadius: BorderRadius.circular(20)),
child: Center(
child: Text(
label,
style: TextStyle(
color: isSelected ? Colors.white : Colors.black, fontSize: 20),
),
),
),
);
}
}