Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-035-CoviDefender
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-035
2021-035-CoviDefender
Commits
4745d41d
Commit
4745d41d
authored
Aug 22, 2021
by
Piyumi Dayarathna
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifications in STracker
parent
690a503e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
192 additions
and
47 deletions
+192
-47
lib/STracker/fResult.dart
lib/STracker/fResult.dart
+14
-10
lib/STracker/finalOverallResultsPage.dart
lib/STracker/finalOverallResultsPage.dart
+12
-37
lib/STracker/overallImageGif.dart
lib/STracker/overallImageGif.dart
+166
-0
No files found.
lib/STracker/fResult.dart
View file @
4745d41d
import
'package:covidefender/STracker/overallImageGif.dart'
;
import
'package:flutter/material.dart'
;
import
'dart:convert'
;
import
'finalOverallResultsPage.dart'
;
...
...
@@ -263,7 +264,8 @@ class _fResultState extends State<fResult> {
),
),
Text
(
"Hand Washing
$marks1
/ 120
\n
\t
\t
\t
\t
\t
$handWashingLevel
"
,
"Hand Washing
\n
$marks1
/ 120
\n
$handWashingLevel
"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w700
,
...
...
@@ -286,7 +288,8 @@ class _fResultState extends State<fResult> {
),
),
Text
(
"Mask Wearing -
$marks2
/ 160
\n
\t
\t
\t
\t
\t
\t
\t
$maskWearingLevel
"
,
"Mask Wearing
\n
$marks2
/ 160
\n
$maskWearingLevel
"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w700
,
...
...
@@ -309,7 +312,8 @@ class _fResultState extends State<fResult> {
),
),
Text
(
"Distance -
$marks3
/ 160
\n
\t
\t
\t
$socialDistanceLevel
"
,
"Social Distance
\n
$marks3
/ 160
\n
$socialDistanceLevel
"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w700
,
...
...
@@ -332,7 +336,8 @@ class _fResultState extends State<fResult> {
),
),
Text
(
"Public places -
$marks4
/ 80
\n
\t
\t
\t
\t
\t
$publicPlacesLevel
"
,
"Public places
\n
$marks4
/ 80
\n
$publicPlacesLevel
"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w700
,
...
...
@@ -355,7 +360,8 @@ class _fResultState extends State<fResult> {
),
),
Text
(
"Symptoms -
$marks5
/ 40
\n
\t
\t
\t
$symptomsLevel
"
,
"Symptoms
\n
$marks5
/ 40
\n
$symptomsLevel
"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w700
,
...
...
@@ -371,12 +377,10 @@ class _fResultState extends State<fResult> {
children:
<
Widget
>[
FlatButton
(
onPressed:
()
{
print
(
"EEEE"
);
check
();
Navigator
.
of
(
context
)
.
pushReplacement
(
MaterialPageRoute
(
builder:
(
context
)
=>
finalOverallResultPage
(),
builder:
(
context
)
=>
overallImageGif
(),
));
},
child:
Image
.
asset
(
...
...
@@ -386,8 +390,8 @@ class _fResultState extends State<fResult> {
height:
60
,
),
),
Text
(
"Overall Awareness
\n
\t
\t
\t
\t
\t
\t
Level"
,
Text
(
"Overall Awareness
\n
Level"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w700
))
...
...
lib/STracker/finalOverallResultsPage.dart
View file @
4745d41d
...
...
@@ -119,52 +119,25 @@ class _finalOverallResultPageState extends State<finalOverallResultPage> {
color:
Colors
.
redAccent
,
onPressed:
()
{},
child:
Text
(
"Overall Awareness Level"
,
"Your Overall Awareness Level"
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
20
),
),
),
)),
Expanded
(
flex:
2
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[],
),
),
Expanded
(
flex:
8
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
RaisedButton
(
color:
Colors
.
white
,
onPressed:
()
{},
child:
ClipRRect
(
child:
Image
(
image:
AssetImage
(
"lib/assets/images/awarenessLevel.gif"
,
),
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
25.0
,
),
)
],
),
),
Expanded
(
flex:
2
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
RaisedButton
(
color:
Colors
.
white
,
color:
Colors
.
blue
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
20.0
)),
onPressed:
()
{},
child:
Text
(
"
Your Awareness Level -
$marks6
"
,
style:
TextStyle
(
color:
Colors
.
red
,
fontSize:
20
),
"
$marks6
"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
20
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10.0
,
...
...
@@ -181,6 +154,8 @@ class _finalOverallResultPageState extends State<finalOverallResultPage> {
children:
<
Widget
>[
RaisedButton
(
color:
Colors
.
white
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
20.0
)),
onPressed:
()
{},
child:
Image
(
image:
AssetImage
(
...
...
@@ -188,15 +163,15 @@ class _finalOverallResultPageState extends State<finalOverallResultPage> {
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
1
0.0
,
horizontal:
25
.0
,
vertical:
2
0.0
,
horizontal:
30
.0
,
),
)
],
),
),
Expanded
(
flex:
4
,
flex:
3
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
...
...
lib/STracker/overallImageGif.dart
0 → 100644
View file @
4745d41d
import
'package:covidefender/STracker/finalOverallResultsPage.dart'
;
import
'package:covidefender/STracker/levelsDashboard.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'variables.dart'
;
class
overallImageGif
extends
StatefulWidget
{
String
marks
;
overallImageGif
()
:
super
();
@override
_overallImageGifState
createState
()
=>
_overallImageGifState
();
}
class
_overallImageGifState
extends
State
<
overallImageGif
>
{
int
ima
=
100
;
_overallImageGifState
();
@override
void
initState
()
{
super
.
initState
();
}
Widget
customcard
(
String
type
,
String
image
)
{
return
Padding
(
padding:
EdgeInsets
.
all
(
20.0
,
),
child:
InkWell
(
onTap:
()
{
// Navigator.of(context).pushReplacement(MaterialPageRoute(
// builder: (context) => getjson(),
// ));
},
child:
Material
(
color:
Colors
.
indigoAccent
,
elevation:
10.0
,
borderRadius:
BorderRadius
.
circular
(
20.0
),
child:
Container
(
child:
Column
(
children:
<
Widget
>[
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
10.0
,
),
child:
Material
(
elevation:
5.0
,
borderRadius:
BorderRadius
.
circular
(
100.0
),
child:
Container
(
height:
100.0
,
width:
100.0
,
child:
ClipOval
(
child:
Image
(
fit:
BoxFit
.
contain
,
image:
AssetImage
(
image
,
),
),
),
),
),
),
Center
(
child:
Text
(
type
,
style:
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w700
,
),
),
),
],
),
),
),
),
);
}
@override
Widget
build
(
BuildContext
context
)
{
SystemChrome
.
setPreferredOrientations
(
[
DeviceOrientation
.
portraitDown
,
DeviceOrientation
.
portraitUp
]);
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
"STracker"
),
),
body:
Column
(
children:
<
Widget
>[
Expanded
(
flex:
2
,
child:
ButtonTheme
(
minWidth:
800.0
,
height:
200.0
,
child:
RaisedButton
(
color:
Colors
.
redAccent
,
onPressed:
()
{},
child:
Text
(
"Overall Awareness Level"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
20
),
),
),
)),
Expanded
(
flex:
1
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[],
),
),
Expanded
(
flex:
6
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
RaisedButton
(
color:
Colors
.
white
,
onPressed:
()
{},
child:
ClipRRect
(
child:
Image
(
image:
AssetImage
(
"lib/assets/images/awarenessLevel.gif"
,
),
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
25.0
,
),
)
],
),
),
Expanded
(
flex:
4
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
RaisedButton
(
color:
Colors
.
blueAccent
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
20.0
)),
onPressed:
()
{
Navigator
.
of
(
context
).
pushReplacement
(
MaterialPageRoute
(
builder:
(
context
)
=>
finalOverallResultPage
(),
));
},
child:
Text
(
"Click Here"
,
style:
TextStyle
(
fontSize:
20.0
,
),
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10.0
,
horizontal:
50.0
,
),
)
],
),
)
],
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment