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
6d3a8008
Commit
6d3a8008
authored
Jun 30, 2021
by
Indika NK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sending message to medical officer basic items
parent
af0bb466
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
1 deletion
+118
-1
lib/pages/self_carer/SC_medicalSupport.dart
lib/pages/self_carer/SC_medicalSupport.dart
+76
-0
lib/pages/self_carer/SC_result_screen.dart
lib/pages/self_carer/SC_result_screen.dart
+4
-1
lib/pages/self_carer/model/MessageSender.dart
lib/pages/self_carer/model/MessageSender.dart
+36
-0
pubspec.yaml
pubspec.yaml
+2
-0
No files found.
lib/pages/self_carer/SC_medicalSupport.dart
0 → 100644
View file @
6d3a8008
import
'package:covidefender/pages/self_carer/model/MessageSender.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
class
SC_medicalResult
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
appBar:
AppBar
(
title:
Text
(
'Results'
),
),
body:
SingleChildScrollView
(
child:
Container
(
color:
Colors
.
white
,
child:
Column
(
children:
[
Center
(
child:
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
height:
MediaQuery
.
of
(
context
).
size
.
height
/
2.5
,
child:
Image
.
asset
(
'lib/assets/images/lab.gif'
)),
),
SizedBox
(
height:
10
,
),
Padding
(
padding:
const
EdgeInsets
.
all
(
16.0
),
child:
Text
(
"Request Medical Officer Support"
,
style:
GoogleFonts
.
lato
(
color:
Colors
.
green
,
fontSize:
24
,
fontWeight:
FontWeight
.
bold
,
letterSpacing:
2
)),
),
SizedBox
(
height:
10
,
),
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
20
,
50
,
50
,
10
),
child:
Text
(
"I agree To send My Details and location to Medical Officer "
,
style:
GoogleFonts
.
adamina
(
color:
Colors
.
blue
,
fontSize:
16
,
fontStyle:
FontStyle
.
italic
,
wordSpacing:
2
),
),
),
SizedBox
(
height:
60
,
),
SizedBox
(
height:
70
,
width:
350
,
child:
ElevatedButton
(
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
red
[
300
],
elevation:
15
,
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
12
)
)
),
onPressed:
()
{
MessageSender
m
=
new
MessageSender
();
m
.
SENDSMS
();
},
child:
Text
(
'SEND SMS'
,
style:
GoogleFonts
.
lato
(
fontWeight:
FontWeight
.
bold
,
fontSize:
16
),)),
)
],
),
),
),
);
}
}
lib/pages/self_carer/SC_result_screen.dart
View file @
6d3a8008
import
'package:covidefender/pages/self_carer/SC_medicalSupport.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
...
@@ -56,7 +57,9 @@ class SC_resultScreen extends StatelessWidget {
...
@@ -56,7 +57,9 @@ class SC_resultScreen extends StatelessWidget {
borderRadius:
BorderRadius
.
circular
(
12
)
borderRadius:
BorderRadius
.
circular
(
12
)
)
)
),
),
onPressed:
()
{},
onPressed:
()
{
Navigator
.
of
(
context
).
push
(
MaterialPageRoute
(
builder:
(
context
)=>
SC_medicalResult
()));
},
child:
Text
(
'Medical Support'
,
style:
GoogleFonts
.
lato
(
child:
Text
(
'Medical Support'
,
style:
GoogleFonts
.
lato
(
fontWeight:
FontWeight
.
bold
,
fontWeight:
FontWeight
.
bold
,
fontSize:
16
fontSize:
16
...
...
lib/pages/self_carer/model/MessageSender.dart
0 → 100644
View file @
6d3a8008
import
'dart:collection'
;
import
'package:flutter_sms/flutter_sms.dart'
;
class
MessageSender
{
List
<
String
>
recipients
=
[
"+94776957629"
];
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);
void
SENDSMS
()
async
{
print
(
myDetails
.
toString
());
String
result
=
await
sendSMS
(
message:
myDetails
.
toString
(),
recipients:
recipients
).
catchError
((
onError
)=>
print
(
onError
));
print
(
"result"
);
}
void
SetData
(
){
}
}
pubspec.yaml
View file @
6d3a8008
...
@@ -36,6 +36,8 @@ dependencies:
...
@@ -36,6 +36,8 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons
:
^1.0.2
cupertino_icons
:
^1.0.2
google_fonts
:
^1.1.2
google_fonts
:
^1.1.2
flutter_sms
:
^2.1.1
#add dependencies for heart rate module
#add dependencies for heart rate module
charts_flutter
:
^0.9.0
charts_flutter
:
^0.9.0
...
...
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