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
ef3ee4b3
Commit
ef3ee4b3
authored
Aug 22, 2021
by
GayaniPKarunaratne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save awairness level to firebase
parent
a8dd8153
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
lib/AuthConfigs/Register.dart
lib/AuthConfigs/Register.dart
+22
-2
lib/EAnalyzer/SearchEvent.dart
lib/EAnalyzer/SearchEvent.dart
+1
-1
No files found.
lib/AuthConfigs/Register.dart
View file @
ef3ee4b3
...
...
@@ -4,6 +4,7 @@ import 'package:firebase_auth/firebase_auth.dart';
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'../main.dart'
;
import
'../STracker/variables.dart'
;
...
...
@@ -54,6 +55,21 @@ class _RegisterState extends State<Register> {
FirebaseUser
user
=
result
.
user
;
print
(
"******* Executing updateUserdata ********"
);
if
(
marks6
==
"Very Low"
)
{
_awarenessLevel
=
"0"
;
}
else
if
(
marks6
==
"Low"
)
{
_awarenessLevel
=
"1"
;
}
else
if
(
marks6
==
"Moderate"
)
{
_awarenessLevel
=
"2"
;
}
else
if
(
marks6
==
"High"
)
{
_awarenessLevel
=
"3"
;
}
else
if
(
marks6
==
"Very High"
)
{
_awarenessLevel
=
"4"
;
}
await
dataService
(
uid:
user
.
uid
).
updateUserData
(
_email
,
_name
,
...
...
@@ -217,11 +233,15 @@ class _RegisterState extends State<Register> {
Container
(
child:
TextFormField
(
readOnly:
true
,
decoration:
InputDecoration
(
labelText:
'Your Awareness Level'
,
labelText:
marks6
,
prefixIcon:
Icon
(
Icons
.
notifications_paused_outlined
)
),
onSaved:
(
input
)
=>
_awarenessLevel
=
input
,
onSaved:
(
input
)
{
print
(
"Awaireness Level"
+
marks6
);
_awarenessLevel
=
input
;
}
),
),
...
...
lib/EAnalyzer/SearchEvent.dart
View file @
ef3ee4b3
...
...
@@ -83,7 +83,7 @@ class _SearchEventState extends State<SearchEvent> {
DateTime
now
=
new
DateTime
.
now
();
//Duration dur = new Duration(days: 1);
var
yesterday
=
now
.
subtract
(
const
Duration
(
days:
3
));
var
yesterday
=
now
.
subtract
(
const
Duration
(
days:
2
));
// String year = yesterday.year.toString();
// String month = yesterday.month.toString();
// String date = yesterday.day.toString();
...
...
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