Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Retrieve data from firestore desplay them using Leaflet maps #263

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ buck-out/
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
Flutter-App/android/app/google-services.json
40 changes: 40 additions & 0 deletions Flutter-App/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Android
google-services.json

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
10 changes: 10 additions & 0 deletions Flutter-App/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: 0b8abb4724aa590dd0f429683339b1e045a1594d
channel: stable

project_type: app
81 changes: 81 additions & 0 deletions Flutter-App/.packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Generated by pub on 2020-04-10 12:47:12.955748.
ansicolor:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/ansicolor-1.0.2/lib/
archive:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/archive-2.0.11/lib/
args:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/args-1.5.2/lib/
async:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.0/lib/
boolean_selector:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.5/lib/
cached_network_image:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-2.0.0/lib/
charcode:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/
cloud_firestore:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/lib/
collection:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/
console_log_handler:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/console_log_handler-1.1.6/lib/
convert:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/convert-2.1.1/lib/
crypto:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/crypto-2.1.3/lib/
cupertino_icons:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/cupertino_icons-0.1.3/lib/
curved_navigation_bar:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/curved_navigation_bar-0.3.2/lib/
equatable:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/equatable-1.1.1/lib/
extra_pedantic:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/extra_pedantic-1.2.0/lib/
fab_circular_menu:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/fab_circular_menu-1.0.0/lib/
firebase:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/firebase-7.2.1/lib/
firebase_auth:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.14.0+9/lib/
firebase_core:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.4+3/lib/
firebase_core_platform_interface:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_platform_interface-1.0.4/lib/
firebase_core_web:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core_web-0.1.1+2/lib/
flutter:file:///home/viraj/Documents/Developments/flutter/packages/flutter/lib/
flutter_cache_manager:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_cache_manager-1.1.3/lib/
flutter_image:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image-3.0.0/lib/
flutter_map:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_map-0.8.2/lib/
flutter_plugin_android_lifecycle:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_plugin_android_lifecycle-1.0.6/lib/
flutter_speed_dial:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_speed_dial-1.2.5/lib/
flutter_test:file:///home/viraj/Documents/Developments/flutter/packages/flutter_test/lib/
flutter_web_plugins:file:///home/viraj/Documents/Developments/flutter/packages/flutter_web_plugins/lib/
geodesy:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/geodesy-0.3.2/lib/
geojson:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/geojson-0.9.1/lib/
geolocator:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.3.1/lib/
geopoint:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/geopoint-0.7.1/lib/
google_api_availability:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/google_api_availability-2.0.4/lib/
google_maps_flutter:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/google_maps_flutter-0.5.25/lib/
http:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/
http_parser:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib/
image:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/image-2.1.4/lib/
intl:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/intl-0.16.1/lib/
iso:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/iso-0.3.0/lib/
js:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/
latlong:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/latlong-0.6.1/lib/
location:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/location-2.5.4/lib/
location_permissions:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-2.0.5/lib/
logging:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/logging-0.11.4/lib/
map_controller:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/map_controller-0.7.1/lib/
matcher:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.6/lib/
meta:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8/lib/
modal_progress_hud:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/modal_progress_hud-0.1.3/lib/
path:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.6.4/lib/
path_provider:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/lib/
path_provider_macos:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-0.0.4/lib/
path_provider_platform_interface:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_platform_interface-1.0.1/lib/
pedantic:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/pedantic-1.8.0+1/lib/
petitparser:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/petitparser-2.4.0/lib/
platform:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/platform-2.2.1/lib/
plugin_platform_interface:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/plugin_platform_interface-1.0.2/lib/
positioned_tap_detector:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/positioned_tap_detector-1.0.3/lib/
quiver:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.5/lib/
rxdart:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/rxdart-0.23.1/lib/
sky_engine:file:///home/viraj/Documents/Developments/flutter/bin/cache/pkg/sky_engine/lib/
slugify2:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/slugify2-0.2.1/lib/
source_span:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.5.5/lib/
sqflite:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.3.0/lib/
sqflite_common:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite_common-1.0.0+1/lib/
stack_trace:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/
stream_channel:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/
string_scanner:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/
synchronized:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/synchronized-2.2.0/lib/
term_glyph:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/
test_api:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.11/lib/
transparent_image:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/transparent_image-1.0.0/lib/
tuple:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/tuple-1.0.3/lib/
typed_data:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/
uuid:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/uuid-2.0.4/lib/
validate:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/validate-1.7.0/lib/
vector_math:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/
xml:file:///home/viraj/Documents/Developments/flutter/.pub-cache/hosted/pub.dartlang.org/xml-3.5.0/lib/
dengue_stop:lib/
18 changes: 18 additions & 0 deletions Flutter-App/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Diseases-Stop

This project will be used to stop dengue spread in the society. After the complete and successful implementation for that issue, the project will be extended to prevent othe diseases as well. Therefore the project name will be used as **Diseases-Stop**.

Access the complete project use the bellow link.

- [Diseases-Stop Project](https://github.com/viradhanus/Diseases-Stop)


## Getting Started

This is a simple login and registration screens for the flutter app, dengue-stop. Previous logo of the react native app is used as the main logo of the flutter app. **Hero animation** is used to enhance UX.

Firebase authentication is used to authenticate users to the app. Users trying to log in with badly-formated email address will be rejected and they should enter atleast 6 characters as a password to log in to the app. Logout button (**X**) is created in Main-Screen. A flutter widget **modal_progress_hud** is used to improve user experience.

For more information use the bellow link.

- [ScoreLab - Dengue-Stop Project](https://github.com/scorelab/dengue-stop)
7 changes: 7 additions & 0 deletions Flutter-App/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
64 changes: 64 additions & 0 deletions Flutter-App/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 29

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.scorelab.denguestop"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
implementation 'com.google.firebase:firebase-auth:19.3.0'
implementation 'com.google.firebase:firebase-firestore:21.4.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
48 changes: 48 additions & 0 deletions Flutter-App/android/app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"project_info": {
"project_number": "402013291968",
"firebase_url": "https://dengue-stop-e74b4.firebaseio.com",
"project_id": "dengue-stop-e74b4",
"storage_bucket": "dengue-stop-e74b4.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:402013291968:android:abc78cf566c04f9a183425",
"android_client_info": {
"package_name": "com.scorelab.denguestop"
}
},
"oauth_client": [
{
"client_id": "402013291968-t0hpq04d14mnudppg3mjem4aam0112ik.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.scorelab.denguestop",
"certificate_hash": "97f69b3bb7064bbaa64b849b2727a7fa9b5c8c82"
}
},
{
"client_id": "402013291968-cfh6oosnpsfqrua776mu4ae1b6prlrtf.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCocAiWrtbqRYR8_J1-VJZjXFBZHQlrg1c"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "402013291968-cfh6oosnpsfqrua776mu4ae1b6prlrtf.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
7 changes: 7 additions & 0 deletions Flutter-App/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.scorelab.denguestop">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
37 changes: 37 additions & 0 deletions Flutter-App/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.scorelab.denguestop">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:name="io.flutter.app.FlutterApplication"
android:label="denguestop"
android:icon="@mipmap/ic_launcher">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyBL9Hg7LbiOQNGrTbpeTivblLj26iRic8E"/>

<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2"
/>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.scorelab.denguestop;

import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterActivity {
@Override
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />

<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions Flutter-App/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
7 changes: 7 additions & 0 deletions Flutter-App/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.scorelab.denguestop">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
Loading