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
c4d536dc
Commit
c4d536dc
authored
Jul 30, 2021
by
GayaniPKarunaratne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get current date in searcheven dart class
parent
504be5aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
lib/EAnalyzer/SearchEvent.dart
lib/EAnalyzer/SearchEvent.dart
+14
-15
No files found.
lib/EAnalyzer/SearchEvent.dart
View file @
c4d536dc
// import 'dart:convert';
// import 'dart:html';
import
'package:intl/date_symbol_data_local.dart'
;
import
'dart:convert'
;
import
'dart:ffi'
;
...
...
@@ -32,14 +32,16 @@ class _SearchEventState extends State<SearchEvent> {
var
tcVisibility
=
false
;
var
now
=
new
DateTime
.
now
();
DateTime
now
=
new
DateTime
.
now
();
Duration
dur
=
new
Duration
(
days:
1
);
//var yesterday = now.subtract(const Duration(days: 1));
// var formatterDate = new DateFormat('dd');
// var formatterMonth = new DateFormat('MM');
// var formatterYear = new DateFormat('yyyy');
// String date = formatterDate.format(yesterday);
// String month = formatterMonth.format(yesterday);
// String year = formatterYear.format(yesterday);
//
String year = formatterYear.format(yesterday);
// String finalDate = '_' + year + '_' + month + '_' + date
// String riskLevelDocument = location + finalDate;
...
...
@@ -150,16 +152,9 @@ Widget _buildDistrict(){
return
'*District is Required'
;
}
},
// items: dist.map((distr){
// return DropdownMenuItem(
// value: distr,
// child: Text('$dist'),
// );
// }),
//------------------------------------------------------
// onSaved: (String value){
// _fName = value;
// },
onSaved:
(
String
value
){
district
=
value
;
},
onChanged:
(
String
district
){
getDistrict
(
district
);
},
...
...
@@ -186,7 +181,7 @@ Widget _buildNoOfInfected(){
// ignore: missing_return
validator:
(
String
value
){
if
(
value
.
isEmpty
)
{
return
'*
Dat
e is Required'
;
return
'*
No Of Infected peopl
e is Required'
;
}
},
// onSaved: (String value){
...
...
@@ -299,6 +294,9 @@ Future<void> check() async{
}
print
(
reText
);
tcVisibility
=
true
;
print
(
'
$now
'
);
print
(
now
.
subtract
(
dur
));
}
...
...
@@ -331,6 +329,7 @@ Future<void> check() async{
SizedBox
(
height:
50
),
//Image(image: AssetImage('lib/assets/images/200.gif')),
//----------------------------------------------------------------------------------------------------
// Image.asset('lib/assets/images/101.gif',fit: BoxFit.contain,width: 150,height: 150,),
// Center(
// child:
...
...
@@ -350,7 +349,7 @@ Future<void> check() async{
fit:
BoxFit
.
contain
,
width:
150
,
height:
150
,
),
),
Text
(
'This is a
$finalRisk
area
'
,
style:
TextStyle
(
fontSize:
25
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
red
[
900
]),),
Text
(
'This is a
$finalRisk
event
'
,
style:
TextStyle
(
fontSize:
25
,
fontWeight:
FontWeight
.
bold
,
color:
Colors
.
red
[
900
]),),
],
)
...
...
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