-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.dart
51 lines (51 loc) · 1.4 KB
/
main.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
void main() {
// The constants
const toMinutes = 60;
// The name of all variables
var userName,
profileFollowers,
profileFollowing,
profileBio,
likes,
messageEngagement,
watchTime,
minutes,
hours,
line;
// The variables data (numbers)
profileFollowers = 200;
profileFollowing = 2;
watchTime = 5;
likes = 5;
// The variables data (strings)
userName = 'aymoqine';
line = '************************************';
profileBio = '''UI/UX Designer
Flutter apps developer''';
// covert hours to minutes
hours = watchTime.toInt();
minutes = ((watchTime - hours) * toMinutes).toInt();
// Check the engagement
if ((watchTime >= 100 && watchTime <= 1000000) ||
(likes >= 100 && likes <= 1000000)) {
messageEngagement = 'You have a suppppper good engagement !';
} else if ((watchTime >= 100 && watchTime <= 50000) ||
(likes >= 100 && likes <= 50000)) {
messageEngagement = 'You have a good engagement ! ';
} else {
messageEngagement = 'You have a poor engagement';
}
// The output
print(''' Your username is : $userName
$line
You have $profileFollowers followers
$line
You follow $profileFollowing
$line
$profileBio
$line
You have $hours hours and $minutes minutes in the watch time
$line
The Engagement status : $messageEngagement
''');
}