Commit 963a4206 authored by Indika NK's avatar Indika NK

Resolved conflicts of EAnalyzer and IGuider Merge

parents 8448922a e2b4bc7d
...@@ -61,4 +61,8 @@ flutter { ...@@ -61,4 +61,8 @@ flutter {
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics'
} }
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
{
"project_info": {
"project_number": "206817019032",
"firebase_url": "https://covidefender-5b8b1-default-rtdb.firebaseio.com",
"project_id": "covidefender-5b8b1",
"storage_bucket": "covidefender-5b8b1.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:206817019032:android:8c981d64ba61069de4bced",
"android_client_info": {
"package_name": "com.example.covidefender"
}
},
"oauth_client": [
{
"client_id": "206817019032-grv9328g4hup8db6vp987rt6nmrdmd3b.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDTZ7KVRrYQylCKI58uqhe6ugoKhti1t8E"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "206817019032-grv9328g4hup8db6vp987rt6nmrdmd3b.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
...@@ -8,6 +8,7 @@ buildscript { ...@@ -8,6 +8,7 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:4.1.0' classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
} }
} }
......
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
class AddLocation extends StatefulWidget { class AddLocation extends StatefulWidget {
@override @override
...@@ -7,119 +8,113 @@ class AddLocation extends StatefulWidget { ...@@ -7,119 +8,113 @@ class AddLocation extends StatefulWidget {
class AddLocationState extends State<AddLocation> { class AddLocationState extends State<AddLocation> {
String _fName; String userName;
String _lName; String phoneNumber;
String _age; String riskLocation;
String _address; String hotelName;
String _nic; String date;
String _phoneNumber; String time;
String _riskLocation;
String _hotelName;
String _date;
String _time;
final GlobalKey<FormState> _formKey = GlobalKey<FormState>(); getUserName(name){
this.userName= name;
}
Widget _buildFName(){ getPhoneNumber(pno){
return TextFormField( this.phoneNumber= pno;
decoration: InputDecoration(labelText: 'First Name'),
validator: (String value){
if (value.isEmpty) {
return '*First Name is Required';
}
},
onSaved: (String value){
_fName = value;
},
);
} }
Widget _buildLName(){ getRiskLocation(location){
return TextFormField( this.riskLocation= location;
decoration: InputDecoration(labelText: 'Last Name'),
validator: (String value){
if (value.isEmpty) {
return '*Last Name is Required';
}
},
onSaved: (String value){
_lName = value;
},
);
} }
Widget _buildAge(){ getHotelName(hotelname){
return TextFormField( this.hotelName= hotelname;
decoration: InputDecoration(labelText: 'Age'),
validator: (String value){
if (value.isEmpty) {
return '*Age is Required';
}
},
onSaved: (String value){
_age = value;
},
);
} }
Widget _buildAddress(){ getDate(date){
return TextFormField( this.date= date;
decoration: InputDecoration(labelText: 'Address'), }
validator: (String value){
if (value.isEmpty) { getTime(time){
return '*Address is Required'; this.time= time;
} }
},
onSaved: (String value){ createData(){
_address = value; print("object");
},
); DocumentReference documentReference = Firestore.instance.collection("RiskLocation").document(userName);
Map<String, dynamic> locations ={
"userName": userName,
"phoneNumber": phoneNumber,
"riskLocation": riskLocation,
"hotelName": hotelName,
"date": date,
"time": time
};
documentReference.setData(locations).whenComplete(() {
print("$userName created");
});
} }
Widget _buildNIC(){ final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
//---------------------------------------------User Name-----------------------------------------------------
Widget _buildName(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'NIC'), decoration: InputDecoration(labelText: 'Full Name'),
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*NIC is Required'; return '*Full Name is Required';
} }
}, },
onSaved: (String value){ // onSaved: (String value){
_nic = value; // _fName = value;
// },
onChanged: (String name){
getUserName(name);
}, },
); );
} }
Widget _buildPhoneNumber(){ //---------------------------------------------Phone Number-----------------------------------------------------
Widget _buildPNo(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Phone Number'), decoration: InputDecoration(labelText: 'Phone Number'),
keyboardType: TextInputType.phone,
maxLength: 10,
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Phone Number is Required'; return '*Phone Number is Required';
} }
}, },
onSaved: (String value){ // onSaved: (String value){
_phoneNumber = value; // _lName = value;
// },
onChanged: (String id){
getPhoneNumber(phoneNumber);
}, },
); );
} }
Widget _buildRiskLocation(){ //---------------------------------------------Risk Location-----------------------------------------------------
Widget _buildLocation(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Risk Location'), decoration: InputDecoration(labelText: 'Risk Location'),
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Location is Required'; return '*Risk Location is Required';
} }
}, },
onSaved: (String value){ // onSaved: (String value){
_riskLocation = value; // _age = value;
// },
onChanged: (String riskLocation){
getRiskLocation(riskLocation);
}, },
); );
} }
//---------------------------------------------Hotel Name-----------------------------------------------------
Widget _buildHotelName(){ Widget _buildHotelName(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Hotel Name'), decoration: InputDecoration(labelText: 'Hotel Name'),
...@@ -128,37 +123,49 @@ Widget _buildHotelName(){ ...@@ -128,37 +123,49 @@ Widget _buildHotelName(){
return '*Hotel Name is Required'; return '*Hotel Name is Required';
} }
}, },
onSaved: (String value){ // onSaved: (String value){
_hotelName = value; // _address = value;
// },
onChanged: (String hotelName){
getHotelName(hotelName);
}, },
); );
} }
//---------------------------------------------Date-----------------------------------------------------
Widget _buildDate(){ Widget _buildDate(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Date'), decoration: InputDecoration(labelText: 'Date'),
keyboardType: TextInputType.datetime,
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Date is Required'; return '*Date is Required';
} }
}, },
onSaved: (String value){ // onSaved: (String value){
_date = value; // _nic = value;
// },
onChanged: (String date){
getDate(date);
}, },
); );
} }
//---------------------------------------------Time-----------------------------------------------------
Widget _buildTime(){ Widget _buildTime(){
return TextFormField( return TextFormField(
decoration: InputDecoration(labelText: 'Time'), decoration: InputDecoration(labelText: 'Time'),
keyboardType: TextInputType.phone,
maxLength: 10,
validator: (String value){ validator: (String value){
if (value.isEmpty) { if (value.isEmpty) {
return '*Time is Required'; return '*Time is Required';
} }
}, },
onSaved: (String value){ // onSaved: (String value){
_time = value; // _phoneNumber = value;
// },
onChanged: (String time){
getTime(time);
}, },
); );
} }
...@@ -177,18 +184,15 @@ Widget _buildTime(){ ...@@ -177,18 +184,15 @@ Widget _buildTime(){
child: Form( child: Form(
key: _formKey, key: _formKey,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
_buildFName(), _buildName(),
_buildLName(), _buildPNo(),
_buildAge(), _buildLocation(),
_buildAddress(), _buildHotelName(),
_buildNIC(), _buildDate(),
_buildPhoneNumber(), _buildTime(),
_buildRiskLocation(),
_buildHotelName(),
_buildDate(),
_buildTime(),
SizedBox(height: 100), SizedBox(height: 100),
RaisedButton( RaisedButton(
...@@ -201,23 +205,24 @@ Widget _buildTime(){ ...@@ -201,23 +205,24 @@ Widget _buildTime(){
return; return;
} }
_formKey.currentState.save(); // _formKey.currentState.save();
print(_fName); // print(_fName);
print(_lName); // print(_lName);
print(_age); // print(_age);
print(_address); // print(_address);
print(_nic); // print(_nic);
print(_phoneNumber); // print(_phoneNumber);
print(_riskLocation); // print(_riskLocation);
print(_hotelName); // print(_hotelName);
print(_date); // print(_date);
print(_time); // print(_time);
createData();
} , } ,
) )
], ],
),), ),),
), ),
......
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'home_screen.dart'; import 'home_screen.dart';
void main() => runApp(MyApp()); // void main() => runApp(MyApp());
void main() async{
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
......
...@@ -15,6 +15,22 @@ packages: ...@@ -15,6 +15,22 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
camera:
dependency: "direct main"
description:
path: "packages/camera/camera"
ref: HEAD
resolved-ref: a2ce3dab466125c86e275e70cb04355a8c3daa16
url: "http://github.com/indikaNK/plugins.git"
source: git
version: "0.8.1"
camera_platform_interface:
dependency: transitive
description:
name: camera_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
characters: characters:
dependency: transitive dependency: transitive
description: description:
...@@ -29,6 +45,20 @@ packages: ...@@ -29,6 +45,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
charts_common:
dependency: transitive
description:
name: charts_common
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
charts_flutter:
dependency: "direct main"
description:
name: charts_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.0"
clock: clock:
dependency: transitive dependency: transitive
description: description:
...@@ -36,6 +66,27 @@ packages: ...@@ -36,6 +66,27 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
cloud_firestore:
dependency: "direct main"
description:
name: cloud_firestore
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.4"
cloud_firestore_platform_interface:
dependency: transitive
description:
name: cloud_firestore_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
cloud_firestore_web:
dependency: transitive
description:
name: cloud_firestore_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1+2"
collection: collection:
dependency: transitive dependency: transitive
description: description:
...@@ -43,6 +94,13 @@ packages: ...@@ -43,6 +94,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.15.0" version: "1.15.0"
cross_file:
dependency: transitive
description:
name: cross_file
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1+1"
cupertino_icons: cupertino_icons:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -57,6 +115,27 @@ packages: ...@@ -57,6 +115,27 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.3"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1+1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
...@@ -74,6 +153,39 @@ packages: ...@@ -74,6 +153,39 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.4"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
...@@ -88,6 +200,13 @@ packages: ...@@ -88,6 +200,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.0"
oktoast:
dependency: "direct main"
description:
name: oktoast
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.2"
path: path:
dependency: transitive dependency: transitive
description: description:
...@@ -109,6 +228,13 @@ packages: ...@@ -109,6 +228,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.0" version: "0.2.0"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.11.0"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
...@@ -116,6 +242,20 @@ packages: ...@@ -116,6 +242,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.1.0" version: "4.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
quiver:
dependency: "direct main"
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
...@@ -142,6 +282,13 @@ packages: ...@@ -142,6 +282,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
stream_transform:
dependency: transitive
description:
name: stream_transform
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
string_scanner: string_scanner:
dependency: transitive dependency: transitive
description: description:
...@@ -163,6 +310,13 @@ packages: ...@@ -163,6 +310,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.19" version: "0.2.19"
tflite:
dependency: "direct main"
description:
name: tflite
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
...@@ -177,6 +331,13 @@ packages: ...@@ -177,6 +331,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
wakelock:
dependency: "direct main"
description:
name: wakelock
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4+2"
xml: xml:
dependency: transitive dependency: transitive
description: description:
......
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