Commit ce87967c authored by PiyumiD's avatar PiyumiD

Change some codes in searchevent.dart class

parent 3a6722e7
......@@ -320,7 +320,7 @@ Widget _buildTime(){
SizedBox(height: 10),
_buildTime(),
//---------------------------------------------Submit-----------------------------------------------------
SizedBox(height: 50),
RaisedButton(
color: Colors.green,
......@@ -351,7 +351,7 @@ Widget _buildTime(){
// } ,
// ),
//---------------------------------------------Update-----------------------------------------------------
RaisedButton(
color: Colors.yellowAccent[700],
child: Text(
......@@ -364,7 +364,7 @@ Widget _buildTime(){
} ,
),
//---------------------------------------------Delete-----------------------------------------------------
RaisedButton(
color: Colors.red,
child: Text(
......
......@@ -58,6 +58,7 @@ class EAnalyzerDash extends StatelessWidget {
primary: false,
crossAxisCount: 2,
children: <Widget>[
//--------------------------------------Cards--------------------------------------------------------------------------------------
Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)),
......
......@@ -11,9 +11,10 @@ class _SearchEventState extends State<SearchEvent> {
String hotelName;
String district;
int noOfInfected;
int nearToDistrict;
int noOfPeople;
String date;
// int ima;
// void riskLevel(){
......@@ -29,6 +30,10 @@ class _SearchEventState extends State<SearchEvent> {
this.district= district;
}
getDate(noOfInfected){
this.noOfInfected= noOfInfected;
}
getNearDistrict(nearToDistrict){
this.nearToDistrict= nearToDistrict;
}
......@@ -37,9 +42,6 @@ class _SearchEventState extends State<SearchEvent> {
this.noOfPeople= noOfPeople;
}
getDate(date){
this.date= date;
}
final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
......@@ -119,8 +121,9 @@ Widget _buildDistrict(){
);
}
//---------------------------------------------Near To District-----------------------------------------------------
Widget _buildNearToDistrict(){
//---------------------------------------------No Of Infected-----------------------------------------------------
Widget _buildNoOfInfected(){
return TextFormField(
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
......@@ -131,27 +134,27 @@ Widget _buildNearToDistrict(){
borderSide: BorderSide(color: Colors.green),
borderRadius: BorderRadius.all(Radius.circular(20))
),
prefixIcon: Icon(Icons.location_on),
hintText: "Ex : 0 or 1",
labelText: 'Near to District or not'
prefixIcon: Icon(Icons.people_outlined),
hintText: "Ex : 250",
labelText: 'No Of Infected People'
),
// ignore: missing_return
validator: (String value){
if (value.isEmpty) {
return '*This is Required';
return '*Date is Required';
}
},
// onSaved: (String value){
// _fName = value;
// },
onChanged: (String nearToDistrict){
getNearDistrict(nearToDistrict);
onChanged: (String noOfInfected){
getNearDistrict(noOfInfected);
},
);
}
//---------------------------------------------No of people-----------------------------------------------------
Widget _buildNoOfPeople(){
//---------------------------------------------Near To District-----------------------------------------------------
Widget _buildNearToDistrict(){
return TextFormField(
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
......@@ -162,9 +165,9 @@ Widget _buildNoOfPeople(){
borderSide: BorderSide(color: Colors.green),
borderRadius: BorderRadius.all(Radius.circular(20))
),
prefixIcon: Icon(Icons.people_outline),
hintText: "Ex : 250",
labelText: 'No Of People'
prefixIcon: Icon(Icons.location_on),
hintText: "Ex : 0 or 1",
labelText: 'Near to District or not'
),
// ignore: missing_return
validator: (String value){
......@@ -175,14 +178,14 @@ Widget _buildNoOfPeople(){
// onSaved: (String value){
// _fName = value;
// },
onChanged: (String noOfPeople){
getPeople(noOfPeople);
onChanged: (String nearToDistrict){
getNearDistrict(nearToDistrict);
},
);
}
//---------------------------------------------Date-----------------------------------------------------
Widget _buildDate(){
//---------------------------------------------No of people-----------------------------------------------------
Widget _buildNoOfPeople(){
return TextFormField(
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
......@@ -193,25 +196,26 @@ Widget _buildDate(){
borderSide: BorderSide(color: Colors.green),
borderRadius: BorderRadius.all(Radius.circular(20))
),
prefixIcon: Icon(Icons.calendar_today),
hintText: "Ex : 2021/04/03",
labelText: 'Date'
prefixIcon: Icon(Icons.people_outline),
hintText: "Ex : 250",
labelText: 'No Of People'
),
// ignore: missing_return
validator: (String value){
if (value.isEmpty) {
return '*Date is Required';
return '*This is Required';
}
},
// onSaved: (String value){
// _fName = value;
// },
onChanged: (String date){
getNearDistrict(date);
onChanged: (String noOfPeople){
getPeople(noOfPeople);
},
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
......@@ -233,18 +237,19 @@ Widget _buildDate(){
SizedBox(height: 10),
_buildDistrict(),
SizedBox(height: 10),
_buildNoOfInfected(),
SizedBox(height: 10),
_buildNearToDistrict(),
SizedBox(height: 10),
_buildNoOfPeople(),
// SizedBox(height: 10),
// _buildDate(),
SizedBox(height: 50),
//Image(image: AssetImage('lib/assets/images/200.gif')),
Image.asset('lib/assets/images/200.gif',fit: BoxFit.contain,width: 150,height: 150,),
Center(child:
Text('This is a Risk Location',style: TextStyle(fontSize: 25,fontWeight: FontWeight.bold, color: Colors.red[900]),)),
Text('This is a risk area',style: TextStyle(fontSize: 25,fontWeight: FontWeight.bold, color: Colors.red[900]),)),
SizedBox(height: 10),
RaisedButton(
shape: RoundedRectangleBorder(
......
......@@ -43,9 +43,9 @@ class _HomeScreenState extends State<HomeScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
CircleAvatar(
radius: 32,
backgroundImage: NetworkImage(
'https://upload.wikimedia.org/wikipedia/commons/a/a0/Pierre-Person.jpg'),
radius: 55,
backgroundColor: Colors.transparent,
backgroundImage: AssetImage('lib/assets/images/cdlogo2.png'),
),
SizedBox(
width: 16,
......
......@@ -87,6 +87,9 @@ flutter:
- lib/assets/images/list80.png
- lib/assets/images/search80.png
- lib/assets/images/200.gif
- lib/assets/images/cdlogo.png
- lib/assets/images/cdlogo1.png
- lib/assets/images/cdlogo2.png
- lib/assets/
......
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