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
504be5aa
Commit
504be5aa
authored
Jul 30, 2021
by
GayaniPKarunaratne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifications in dropdown
parent
85d1704e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
4 deletions
+47
-4
lib/EAnalyzer/SearchEvent.dart
lib/EAnalyzer/SearchEvent.dart
+47
-4
No files found.
lib/EAnalyzer/SearchEvent.dart
View file @
504be5aa
...
...
@@ -8,6 +8,7 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/material.dart'
;
// import 'package:cloud_firestore/cloud_firestore.dart';
import
'package:http/http.dart'
as
http
;
import
'package:quiver/testing/time.dart'
;
class
SearchEvent
extends
StatefulWidget
{
...
...
@@ -25,10 +26,26 @@ class _SearchEventState extends State<SearchEvent> {
String
noOfPeople
;
int
ima
;
//final List<String> dist = ['ampara', 'anuradhapura', 'badulla', 'batticaloa','colombo','galle','gampaha','hambantota','jaffna','kalmunai','kalutara','kandy','kegalle','kilinochchi','kurunagala','mannar','matale','matara','monaragala','mullaitivu','nuwara eliya','polonnaruwa','puttalam','ratnapura','trincomalee','vavuniya'];
var
finalRisk
=
'rrrr'
;
var
tcVisibility
=
false
;
var
now
=
new
DateTime
.
now
();
//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 finalDate = '_' + year + '_' + month + '_' + date
// String riskLevelDocument = location + finalDate;
// int ima;
// void riskLevel(){
...
...
@@ -106,7 +123,14 @@ Widget _buildHotelName(){
//---------------------------------------------District-----------------------------------------------------
Widget
_buildDistrict
(
){
return
TextFormField
(
return
DropdownButtonFormField
(
items:
<
String
>[
'ampara'
,
'anuradhapura'
,
'badulla'
,
'batticaloa'
,
'colombo'
,
'galle'
,
'gampaha'
,
'hambantota'
,
'jaffna'
,
'kalmunai'
,
'kalutara'
,
'kandy'
,
'kegalle'
,
'kilinochchi'
,
'kurunagala'
,
'mannar'
,
'matale'
,
'matara'
,
'monaragala'
,
'mullaitivu'
,
'nuwara eliya'
,
'polonnaruwa'
,
'puttalam'
,
'ratnapura'
,
'trincomalee'
,
'vavuniya'
]
.
map
<
DropdownMenuItem
<
String
>>((
String
value
)
{
return
DropdownMenuItem
<
String
>(
value:
value
,
child:
Text
(
value
),
);
}).
toList
(),
decoration:
InputDecoration
(
enabledBorder:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
Colors
.
indigo
[
900
]),
...
...
@@ -126,6 +150,13 @@ Widget _buildDistrict(){
return
'*District is Required'
;
}
},
// items: dist.map((distr){
// return DropdownMenuItem(
// value: distr,
// child: Text('$dist'),
// );
// }),
//------------------------------------------------------
// onSaved: (String value){
// _fName = value;
// },
...
...
@@ -169,7 +200,14 @@ Widget _buildNoOfInfected(){
//---------------------------------------------Near To District-----------------------------------------------------
Widget
_buildNearToDistrict
(
){
return
TextFormField
(
return
DropdownButtonFormField
(
items:
<
String
>[
'0'
,
'1'
]
.
map
<
DropdownMenuItem
<
String
>>((
String
value
)
{
return
DropdownMenuItem
<
String
>(
value:
value
,
child:
Text
(
value
),
);
}).
toList
(),
decoration:
InputDecoration
(
enabledBorder:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
Colors
.
indigo
[
900
]),
...
...
@@ -298,7 +336,9 @@ Future<void> check() async{
// child:
// Text('This is a $finalRisk area',style: TextStyle(fontSize: 25,fontWeight: FontWeight.bold, color: Colors.red[900]),)),
// SizedBox(height: 10),
Visibility
(
visible:
tcVisibility
,
child:
new
Column
(
...
...
@@ -331,6 +371,7 @@ Future<void> check() async{
),
onPressed:
()
{
check
();
Visibility
();
// if(!_formKey.currentState.validate()) {
// return;
...
...
@@ -340,7 +381,9 @@ Future<void> check() async{
// var reText = jsonDecode(Data);
// riskLevel();
}
,
},
),
],
...
...
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