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
8f94e6aa
Commit
8f94e6aa
authored
Jul 03, 2021
by
GayaniPKarunaratne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change some codes in hotelmap dart file
parent
7aceccb6
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
375 additions
and
100 deletions
+375
-100
android/app/src/main/AndroidManifest.xml
android/app/src/main/AndroidManifest.xml
+1
-1
lib/EAnalyzer/EAnalyzerDash.dart
lib/EAnalyzer/EAnalyzerDash.dart
+2
-1
lib/EAnalyzer/HospitalDetails.dart
lib/EAnalyzer/HospitalDetails.dart
+3
-0
lib/EAnalyzer/HotelMap.dart
lib/EAnalyzer/HotelMap.dart
+3
-2
lib/EAnalyzer/RiskEventList.dart
lib/EAnalyzer/RiskEventList.dart
+132
-0
lib/EAnalyzer/SearchEvent.dart
lib/EAnalyzer/SearchEvent.dart
+231
-95
lib/assets/images/200.gif
lib/assets/images/200.gif
+0
-0
pubspec.yaml
pubspec.yaml
+3
-1
No files found.
android/app/src/main/AndroidManifest.xml
View file @
8f94e6aa
...
...
@@ -4,7 +4,7 @@
android:label=
"covidefender"
android:icon=
"@mipmap/ic_launcher"
>
<meta-data
android:name=
"com.google.android.geo.API_KEY"
android:value=
"
"
/>
android:value=
"AIzaSyBuDih9ioyQAR9ikg3zEoE_5mhXvZh5oAw
"
/>
<activity
android:name=
".MainActivity"
android:launchMode=
"singleTop"
...
...
lib/EAnalyzer/EAnalyzerDash.dart
View file @
8f94e6aa
...
...
@@ -3,6 +3,7 @@ import 'package:covidefender/EAnalyzer/HotelMap.dart';
import
'package:covidefender/EAnalyzer/SearchEvent.dart'
;
import
'package:flutter/material.dart'
;
import
'AddLocation.dart'
;
import
'RiskEventList.dart'
;
class
EAnalyzerDash
extends
StatelessWidget
{
@override
...
...
@@ -108,7 +109,7 @@ class EAnalyzerDash extends StatelessWidget {
onPressed:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
EAnalyzerDash
()),
MaterialPageRoute
(
builder:
(
context
)
=>
RiskEventList
()),
);
},
child:
Image
.
asset
(
'lib/assets/images/list80.png'
),
...
...
lib/EAnalyzer/HospitalDetails.dart
View file @
8f94e6aa
...
...
@@ -72,6 +72,9 @@ class _HospitalDetailsState extends State<HospitalDetails> {
padding:
const
EdgeInsets
.
all
(
12.0
),
child:
Row
(
children:
<
Widget
>[
// CircleAvatar(
// ),
Padding
(
padding:
const
EdgeInsets
.
all
(
12.0
),
child:
Text
(
"Hospital ID:
${userData[index]["hospital_id"]}
\n
${userData[index]["hospital"]["name"]}
\n
${userData[index]["hospital"]["name_si"]}
\n\n
Total Patients:
${userData[index]["cumulative_total"]}
\n
Date/Time:
${userData[index]["created_at"]}
"
,
...
...
lib/EAnalyzer/HotelMap.dart
View file @
8f94e6aa
...
...
@@ -23,8 +23,9 @@ class _HotelMapState extends State<HotelMap> {
child:
GoogleMap
(
initialCameraPosition:
CameraPosition
(
target:
LatLng
(
40.7128
,
-
74.0060
),
zoom:
20.0
,
target:
LatLng
(
7.8731
,
80.7718
),
zoom:
8.0
,
),
),
),
...
...
lib/EAnalyzer/RiskEventList.dart
0 → 100644
View file @
8f94e6aa
import
'package:flutter/material.dart'
;
import
'package:cloud_firestore/cloud_firestore.dart'
;
import
'package:flutter_spinkit/flutter_spinkit.dart'
;
class
RiskEventList
extends
StatefulWidget
{
const
RiskEventList
({
Key
key
})
:
super
(
key:
key
);
@override
_RiskEventListState
createState
()
=>
_RiskEventListState
();
}
class
_RiskEventListState
extends
State
<
RiskEventList
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
new
Scaffold
(
appBar:
AppBar
(
backwardsCompatibility:
false
,
backgroundColor:
Color
(
0xFF1B5E20
),
title:
Text
(
"Search Risk Hotels"
),
),
body:
ListPage
(),
);
}
}
class
ListPage
extends
StatefulWidget
{
@override
_ListPageState
createState
()
=>
_ListPageState
();
}
class
_ListPageState
extends
State
<
ListPage
>
{
Future
_data
;
Future
getRiskLocation
()
async
{
var
firestore
=
Firestore
.
instance
;
QuerySnapshot
qn
=
await
firestore
.
collection
(
"RiskLocation"
).
getDocuments
();
return
qn
.
documents
;
}
navigateToDetail
(
DocumentSnapshot
riskLocation
){
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
DetailPage
(
riskLocation:
riskLocation
,)));
}
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
_data
=
getRiskLocation
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
child:
FutureBuilder
(
future:
_data
,
// ignore: missing_return
builder:
(
_
,
snapshot
){
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
)
{
return
Center
(
child:
SpinKitFadingCircle
(
color:
Colors
.
green
,
size:
80.0
,
),
);
}
else
{
return
ListView
.
builder
(
itemCount:
snapshot
.
data
.
length
,
itemBuilder:
(
_
,
index
){
return
Card
(
elevation:
8
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
15.0
),
),
color:
Colors
.
lightGreen
[
100
],
child:
ListTile
(
leading:
Icon
(
Icons
.
location_city
,
size:
40
),
title:
Text
(
snapshot
.
data
[
index
].
data
()[
"hotelName"
],
style:
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
bold
),),
subtitle:
Text
(
snapshot
.
data
[
index
].
data
()[
"riskLocation"
],
style:
TextStyle
(
fontSize:
16.0
),),
onTap:
()
=>
navigateToDetail
(
snapshot
.
data
[
index
]),
),
);
});
}
}
),
);
}
}
class
DetailPage
extends
StatefulWidget
{
final
DocumentSnapshot
riskLocation
;
DetailPage
({
this
.
riskLocation
});
@override
_DetailPageState
createState
()
=>
_DetailPageState
();
}
class
_DetailPageState
extends
State
<
DetailPage
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
backwardsCompatibility:
false
,
backgroundColor:
Color
(
0xFF1B5E20
),
title:
Text
(
widget
.
riskLocation
.
data
()[
"hotelName"
]),
),
body:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
100
,
child:
Card
(
elevation:
8
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
20.0
),
),
color:
Colors
.
lightGreen
[
50
],
child:
ListTile
(
leading:
Icon
(
Icons
.
timelapse
,
size:
40
),
title:
Text
(
"Date :
${widget.riskLocation.data()["date"]}
"
,
style:
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
bold
),),
subtitle:
Text
(
"Time :
${widget.riskLocation.data()["time"]}
"
,
style:
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
bold
),),
),
),
),
);
}
}
lib/EAnalyzer/SearchEvent.dart
View file @
8f94e6aa
This diff is collapsed.
Click to expand it.
lib/assets/images/200.gif
0 → 100644
View file @
8f94e6aa
107 KB
pubspec.yaml
View file @
8f94e6aa
...
...
@@ -33,7 +33,7 @@ dependencies:
wakelock
:
^0.1.4+1
charts_flutter
:
^0.9.0
flutter_spinkit
:
"
^4.1.2"
google_maps_flutter
:
^2.0.6
...
...
@@ -52,6 +52,7 @@ dependencies:
git
:
url
:
http://github.com/indikaNK/plugins.git
path
:
packages/camera/camera
google_maps_flutter
:
^2.0.6
dev_dependencies
:
...
...
@@ -85,6 +86,7 @@ flutter:
-
lib/assets/images/feedback80.png
-
lib/assets/images/list80.png
-
lib/assets/images/search80.png
-
lib/assets/images/200.gif
-
lib/assets/
...
...
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