Commit c4d536dc authored by GayaniPKarunaratne's avatar GayaniPKarunaratne

Get current date in searcheven dart class

parent 504be5aa
// import 'dart:convert';
// import 'dart:html';
import 'package:intl/date_symbol_data_local.dart';
import 'dart:convert';
import 'dart:ffi';
......@@ -32,7 +32,9 @@ 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');
......@@ -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 '*Date is Required';
return '*No Of Infected people 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]),),
],
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment