Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medapp_eksad
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qorri_di
medapp_eksad
Commits
7289d3c7
Commit
7289d3c7
authored
Sep 01, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/qorridi/medapp_eksad
Conflicts: lib/main.dart
parents
5b81d029
3b8b2765
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
165 deletions
+101
-165
register.jpg
assets/images/register.jpg
+0
-0
contact_api.dart
lib/api/contact_api.dart
+6
-6
appbar_home.dart
lib/appbar/appbar_home.dart
+1
-0
main.dart
lib/main.dart
+2
-0
register.dart
lib/register.dart
+28
-0
contact_us2.dart
lib/screen/contact_us/contact_us2.dart
+3
-26
small_contact_us2.dart
lib/screen_small/small_contact/small_contact_us2.dart
+3
-26
small_home4.dart
lib/screen_small/small_home/small_home4.dart
+58
-107
No files found.
assets/images/register.jpg
0 → 100644
View file @
7289d3c7
174 KB
lib/api/contact_api.dart
View file @
7289d3c7
...
@@ -3,7 +3,7 @@ import 'dart:convert';
...
@@ -3,7 +3,7 @@ import 'dart:convert';
import
'package:http/http.dart'
as
http
;
import
'package:http/http.dart'
as
http
;
import
'package:medapp_eksad/model/contact_model.dart'
;
import
'package:medapp_eksad/model/contact_model.dart'
;
Future
<
bool
>
savecontact
(
nama
,
email
,
nohp
,
message
)
async
{
Future
savecontact
(
nama
,
email
,
nohp
,
message
)
async
{
final
response
=
await
http
.
post
(
final
response
=
await
http
.
post
(
Uri
.
parse
(
'http://10.107.121.210:8081/medapp/v1/api/contact/save'
),
Uri
.
parse
(
'http://10.107.121.210:8081/medapp/v1/api/contact/save'
),
body:
jsonEncode
({
body:
jsonEncode
({
...
@@ -14,11 +14,11 @@ Future<bool> savecontact(nama, email, nohp, message) async {
...
@@ -14,11 +14,11 @@ Future<bool> savecontact(nama, email, nohp, message) async {
headers:
{
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
'Content-type'
:
'application/json; charset=UTF-8'
,
});
});
if
(
response
.
statusCode
==
200
)
{
//
if (response.statusCode == 200) {
return
true
;
//
return true;
}
else
{
//
} else {
return
false
;
//
return false;
}
//
}
}
}
Future
<
List
<
contact
>>
showcontact
()
async
{
Future
<
List
<
contact
>>
showcontact
()
async
{
...
...
lib/appbar/appbar_home.dart
View file @
7289d3c7
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:medapp_eksad/widget/button_appbar.dart'
;
import
'package:medapp_eksad/widget/button_appbar.dart'
;
import
'package:medapp_eksad/register.dart'
;
AppBar
AppbarHomeLarge
(
Size
screenSize
,
BuildContext
context
,
Color
home
,
AppBar
AppbarHomeLarge
(
Size
screenSize
,
BuildContext
context
,
Color
home
,
...
...
lib/main.dart
View file @
7289d3c7
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import
'package:medapp_eksad/dashboard/main_dashboard.dart'
;
import
'package:medapp_eksad/dashboard/main_dashboard.dart'
;
import
'package:medapp_eksad/homepage.dart'
;
import
'package:medapp_eksad/homepage.dart'
;
import
'package:medapp_eksad/login.dart'
;
import
'package:medapp_eksad/login.dart'
;
import
'package:medapp_eksad/register.dart'
;
import
'package:medapp_eksad/screen/contact_us/contact_us.dart'
;
import
'package:medapp_eksad/screen/contact_us/contact_us.dart'
;
import
'package:medapp_eksad/screen/solution.dart'
;
import
'package:medapp_eksad/screen/solution.dart'
;
...
@@ -24,6 +25,7 @@ class MyApp extends StatelessWidget {
...
@@ -24,6 +25,7 @@ class MyApp extends StatelessWidget {
'/solutions'
:
(
context
)
=>
const
Solutions
(),
'/solutions'
:
(
context
)
=>
const
Solutions
(),
'/contact'
:
(
context
)
=>
const
ContactUs
(),
'/contact'
:
(
context
)
=>
const
ContactUs
(),
'/login'
:
(
context
)
=>
const
login
(),
'/login'
:
(
context
)
=>
const
login
(),
'/register'
:
(
context
)
=>
const
Register
(),
'/dashboard'
:
(
context
)
=>
const
Dashboard
()
'/dashboard'
:
(
context
)
=>
const
Dashboard
()
},
},
);
);
...
...
lib/register.dart
0 → 100644
View file @
7289d3c7
import
'package:flutter/material.dart'
;
class
Register
extends
StatefulWidget
{
const
Register
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
Register
>
createState
()
=>
_RegisterState
();
}
class
_RegisterState
extends
State
<
Register
>
{
@override
Widget
build
(
BuildContext
context
)
{
var
screenize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
body:
Container
(
height:
screenize
.
height
,
width:
screenize
.
width
,
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
AssetImage
(
"assets/images/register.jpg"
),
fit:
BoxFit
.
fill
,
)
),
),
);
}
}
lib/screen/contact_us/contact_us2.dart
View file @
7289d3c7
...
@@ -4,6 +4,7 @@ import 'package:google_fonts/google_fonts.dart';
...
@@ -4,6 +4,7 @@ import 'package:google_fonts/google_fonts.dart';
// import 'package:mcs_flutter/const/conts.dart';
// import 'package:mcs_flutter/const/conts.dart';
import
'dart:convert'
;
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
import
'package:http/http.dart'
as
http
;
import
'package:medapp_eksad/api/contact_api.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
class
ContactUs2
extends
StatelessWidget
{
class
ContactUs2
extends
StatelessWidget
{
...
@@ -251,10 +252,10 @@ class ContactUs2 extends StatelessWidget {
...
@@ -251,10 +252,10 @@ class ContactUs2 extends StatelessWidget {
style:
Btn_Submit
(),
style:
Btn_Submit
(),
onPressed:
()
async
{
onPressed:
()
async
{
if
(
_formKey
.
currentState
!.
validate
())
{
if
(
_formKey
.
currentState
!.
validate
())
{
final
response
=
await
SendEmail
(
final
response
=
await
savecontact
(
nameController
.
value
.
text
,
nameController
.
value
.
text
,
phoneController
.
value
.
text
,
emailController
.
value
.
text
,
emailController
.
value
.
text
,
phoneController
.
value
.
text
,
messageController
.
value
.
text
);
messageController
.
value
.
text
);
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
response
==
200
response
==
200
...
@@ -289,28 +290,4 @@ class ContactUs2 extends StatelessWidget {
...
@@ -289,28 +290,4 @@ class ContactUs2 extends StatelessWidget {
),
),
);
);
}
}
Future
SendEmail
(
String
name
,
String
phone
,
String
email
,
String
message
)
async
{
final
url
=
Uri
.
parse
(
'https://api.emailjs.com/api/v1.0/email/send'
);
const
serviceId
=
'service_wava70j'
;
const
templateId
=
'template_koc73cj'
;
const
userId
=
'h4BmDnyWlm3OziBDx'
;
final
response
=
await
http
.
post
(
url
,
headers:
{
'Content-Type'
:
'application/json'
},
//This line makes sure it works for all platforms.
body:
json
.
encode
({
'service_id'
:
serviceId
,
'template_id'
:
templateId
,
'user_id'
:
userId
,
'template_params'
:
{
'from_name'
:
name
,
'from_phone'
:
phone
,
'to_email'
:
email
,
'message'
:
message
}
}));
return
response
.
statusCode
;
}
}
}
lib/screen_small/small_contact/small_contact_us2.dart
View file @
7289d3c7
...
@@ -4,6 +4,7 @@ import 'package:google_fonts/google_fonts.dart';
...
@@ -4,6 +4,7 @@ import 'package:google_fonts/google_fonts.dart';
// import 'package:mcs_flutter/const/conts.dart';
// import 'package:mcs_flutter/const/conts.dart';
import
'dart:convert'
;
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
import
'package:http/http.dart'
as
http
;
import
'package:medapp_eksad/api/contact_api.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
...
@@ -232,10 +233,10 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
...
@@ -232,10 +233,10 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
style:
Btn_Submit
(),
style:
Btn_Submit
(),
onPressed:
()
async
{
onPressed:
()
async
{
if
(
_formKey
.
currentState
!.
validate
())
{
if
(
_formKey
.
currentState
!.
validate
())
{
final
response
=
await
SendEmail
(
final
response
=
await
savecontact
(
nameController
.
value
.
text
,
nameController
.
value
.
text
,
phoneController
.
value
.
text
,
emailController
.
value
.
text
,
emailController
.
value
.
text
,
phoneController
.
value
.
text
,
messageController
.
value
.
text
);
messageController
.
value
.
text
);
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
response
==
200
response
==
200
...
@@ -267,30 +268,6 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
...
@@ -267,30 +268,6 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
),
),
);
);
}
}
Future
SendEmail
(
String
name
,
String
phone
,
String
email
,
String
message
)
async
{
final
url
=
Uri
.
parse
(
'https://api.emailjs.com/api/v1.0/email/send'
);
const
serviceId
=
'service_wava70j'
;
const
templateId
=
'template_koc73cj'
;
const
userId
=
'h4BmDnyWlm3OziBDx'
;
final
response
=
await
http
.
post
(
url
,
headers:
{
'Content-Type'
:
'application/json'
},
//This line makes sure it works for all platforms.
body:
json
.
encode
({
'service_id'
:
serviceId
,
'template_id'
:
templateId
,
'user_id'
:
userId
,
'template_params'
:
{
'from_name'
:
name
,
'from_phone'
:
phone
,
'to_email'
:
email
,
'message'
:
message
}
}));
return
response
.
statusCode
;
}
}
}
lib/screen_small/small_home/small_home4.dart
View file @
7289d3c7
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
class
SmallHome4
extends
StatelessWidget
{
class
SmallHome4
extends
StatelessWidget
{
const
SmallHome4
({
Key
?
key
})
:
super
(
key:
key
);
const
SmallHome4
({
Key
?
key
})
:
super
(
key:
key
);
...
@@ -10,7 +9,7 @@ class SmallHome4 extends StatelessWidget {
...
@@ -10,7 +9,7 @@ class SmallHome4 extends StatelessWidget {
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
),
width:
ScreenSize
.
width
,
width:
ScreenSize
.
width
,
height:
ScreenSize
.
height
*
1.
5
,
height:
ScreenSize
.
height
*
1.
7
,
color:
Colors
.
white
,
color:
Colors
.
white
,
child:
Container
(
child:
Container
(
width:
ScreenSize
.
width
*
0.20
,
width:
ScreenSize
.
width
*
0.20
,
...
@@ -21,8 +20,7 @@ class SmallHome4 extends StatelessWidget {
...
@@ -21,8 +20,7 @@ class SmallHome4 extends StatelessWidget {
color:
Colors
.
blue
[
900
],
color:
Colors
.
blue
[
900
],
boxShadow:
[
boxShadow:
[
BoxShadow
(
BoxShadow
(
color:
color:
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
).
withAlpha
(
60
),
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
).
withAlpha
(
60
),
blurRadius:
15.0
,
blurRadius:
15.0
,
spreadRadius:
10.0
,
spreadRadius:
10.0
,
offset:
const
Offset
(
offset:
const
Offset
(
...
@@ -32,102 +30,54 @@ class SmallHome4 extends StatelessWidget {
...
@@ -32,102 +30,54 @@ class SmallHome4 extends StatelessWidget {
),
),
],
],
),
),
child:
Container
(
child:
Column
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
width:
ScreenSize
.
width
*
0.36
,
width:
ScreenSize
.
width
*
0.36
,
height:
ScreenSize
.
height
*
0.69
,
height:
ScreenSize
.
height
*
0.7
,
color:
Colors
.
blue
[
900
],
color:
Colors
.
blue
[
900
],
child:
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
all
(
30
),
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
SizedBox
(
height:
40
,),
Column
(
Row
(
children:
[
children:
[
Text
(
"Mobile & Web Apps"
,
Container
(
style:
TextStyle
(
height:
ScreenSize
.
height
*
0.3
,
color:
Colors
.
white
,
width:
ScreenSize
.
width
*
0.30
,
fontSize:
34
child:
Text
(
),
"Mobile & Web Apps"
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
34
),
textAlign:
TextAlign
.
center
,
),
),
],
),
),
SizedBox
(
height:
30
,),
Row
(
children:
[
Container
(
Container
(
height:
100
,
height:
ScreenSize
.
height
*
0.3
,
width:
ScreenSize
.
width
*
0.30
,
width:
ScreenSize
.
width
*
0.30
,
child:
Text
(
child:
Text
(
"MedApps menyediakan Aplikasi Mobile dan juga website yang bisa anda kunjungi"
,
"MedApps menyediakan Aplikasi Mobile dan juga website yang bisa anda kunjungi"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
fontSize:
18
,
)),
color:
Colors
.
white
),
)
),
],
),
// SizedBox(height: 10,),
Row
(
children:
[
Container
(
Container
(
height
:
50
,
height
:
50
,
width
:
200
,
width
:
200
,
child:
ElevatedButton
(
child:
ElevatedButton
(
onPressed:
()
{},
onPressed:
()
{},
style:
ElevatedButton
.
styleFrom
(
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
blue
[
900
],
primary:
Colors
.
blue
[
900
],
onSurface:
Colors
.
white
,
onSurface:
Colors
.
white
,
side:
BorderSide
(
side:
BorderSide
(
color:
Colors
.
white
),
color:
Colors
.
white
),
shape:
RoundedRectangleBorder
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
30
)
borderRadius:
),
BorderRadius
.
all
(
Radius
.
circular
(
30
)
),
),
),
),
),
child:
Text
(
child:
Text
(
"LEARN MORE"
,
"LEARN MORE"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
18
,
letterSpacing:
2
),
fontSize:
18
,
letterSpacing:
2
),
),
),
// child: ElevatedButton(
// onPressed: (){},
// style: DefaultColors(),
// // ElevatedButton.styleFrom(
// // primary: Colors.blue,
// // fixedSize: Size(170, 85),
// // onPrimary: Colors.white,
// // shape: RoundedRectangleBorder(
// // borderRadius: BorderRadius.all(Radius.circular(30),
// // )
// // )
// // ),
// child: Text("LEARN MORE",
// style: TextStyle(
// fontSize: 18,
// letterSpacing: 2
// ),
// ),
// ),
),
),
],
),
],
),
),
),
),
),
SizedBox
(
width:
40
,),
Container
(
Container
(
width:
ScreenSize
.
width
*
0.3
,
width:
ScreenSize
.
width
*
0.3
,
height:
ScreenSize
.
height
*
0.69
,
height:
ScreenSize
.
height
*
0.69
,
...
@@ -135,16 +85,17 @@ class SmallHome4 extends StatelessWidget {
...
@@ -135,16 +85,17 @@ class SmallHome4 extends StatelessWidget {
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
image:
DecorationImage
(
image:
DecorationImage
(
image:
AssetImage
(
'assets/images/medaps3.png'
)
image:
AssetImage
(
'assets/images/medaps3.png'
)),
),
borderRadius:
BorderRadius
.
circular
(
20
)),
borderRadius:
BorderRadius
.
circular
(
20
)
),
),
],
),
),
],
],
),
),
),
),
],
),
),
),
);
);
}
}
}
}
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