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
a6168589
Commit
a6168589
authored
Jul 12, 2021
by
indika N kumara
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'I_GUIDER_PHASE_03_NK' into 'dev_release'
IGUDER_PHASE03 See merge request
!21
parents
c0f97a17
db4da9bd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
12 deletions
+41
-12
lib/assets/images/lab.gif
lib/assets/images/lab.gif
+0
-0
lib/pages/self_carer/model/MessageSender.dart
lib/pages/self_carer/model/MessageSender.dart
+40
-12
pubspec.yaml
pubspec.yaml
+1
-0
No files found.
lib/assets/images/lab.gif
0 → 100644
View file @
a6168589
127 KB
lib/pages/self_carer/model/MessageSender.dart
View file @
a6168589
import
'dart:collection'
;
import
'dart:collection'
;
import
'package:cloud_firestore/cloud_firestore.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter_sms/flutter_sms.dart'
;
import
'package:flutter_sms/flutter_sms.dart'
;
class
MessageSender
{
class
MessageSender
{
List
<
String
>
recipients
=
[
"+94776957629"
];
List
<
String
>
recipients
=
[
"+94776957629"
];
Map
<
String
,
String
>
myDetails
=
{
String
Name
;
"Name"
:
"Indika Nuwan"
,
String
phoneNumber
;
"Address"
:
"02 nd post ,Mawanella"
,
String
Address
;
"HomePhone"
:
"03522444555"
,
String
HomePhone
;
"message"
:
"This Patient Need Imediate assistance"
};
//
// Map<String,String> myDetails = {
// "Name" : "Indika Nuwan",
// "Address" : "02 nd post ,Mawanella",
// "HomePhone" : "03522444555",
// "message" : "This Patient Need Imediate assistance"
// };
// MessageSender(this.recipients, this.message);
// MessageSender(this.recipients, this.message);
void
SENDSMS
()
async
{
void
SENDSMS
()
async
{
print
(
myDetails
.
toString
());
print
(
"Executing get data"
);
String
result
=
await
sendSMS
(
message:
myDetails
.
toString
(),
recipients:
recipients
).
catchError
((
onError
)=>
print
(
onError
));
final
CollectionReference
userlist
=
print
(
"result"
);
FirebaseFirestore
.
instance
.
collection
(
"users"
);
}
userlist
.
get
().
then
((
datasnapshot
){
print
(
"Executing get data ..."
);
FirebaseFirestore
.
instance
.
collection
(
"users"
).
get
().
then
((
QuerySnapshot
snapshot
){
snapshot
.
docs
.
forEach
((
doc
)
async
{
print
(
doc
[
"Name"
]);
print
(
doc
[
"Address"
]);
print
(
doc
[
"Home phone"
]);
print
(
doc
[
"mobile"
]);
Map
<
String
,
String
>
UserDetails
=
{
"Name"
:
doc
[
"Name"
],
"Address"
:
doc
[
"Address"
],
"HomePhone"
:
doc
[
"Home phone"
],
"message"
:
"This Patient Need Imediate assistance"
};
void
SetData
(
){
}
print
(
"UserDetails : "
+
UserDetails
.
toString
());
String
result
=
await
sendSMS
(
message:
UserDetails
.
toString
(),
recipients:
recipients
).
catchError
((
onError
)=>
print
(
onError
));
print
(
"result"
);
});
});
});
}
}
}
...
...
pubspec.yaml
View file @
a6168589
...
@@ -124,6 +124,7 @@ flutter:
...
@@ -124,6 +124,7 @@ flutter:
-
assets/
-
assets/
-
lib/assets/images/wear.gif
-
lib/assets/images/wear.gif
-
lib/assets/images/hospital.gif
-
lib/assets/images/hospital.gif
-
lib/assets/images/lab.gif
# To add assets to your application, add an assets section, like this:
# To add assets to your application, add an assets section, like this:
# assets:
# 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