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
Hide 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';
import
'package:http/http.dart'
as
http
;
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
(
Uri
.
parse
(
'http://10.107.121.210:8081/medapp/v1/api/contact/save'
),
body:
jsonEncode
({
...
...
@@ -14,11 +14,11 @@ Future<bool> savecontact(nama, email, nohp, message) async {
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
});
if
(
response
.
statusCode
==
200
)
{
return
true
;
}
else
{
return
false
;
}
//
if (response.statusCode == 200) {
//
return true;
//
} else {
//
return false;
//
}
}
Future
<
List
<
contact
>>
showcontact
()
async
{
...
...
lib/appbar/appbar_home.dart
View file @
7289d3c7
import
'package:flutter/material.dart'
;
import
'package:medapp_eksad/widget/button_appbar.dart'
;
import
'package:medapp_eksad/register.dart'
;
AppBar
AppbarHomeLarge
(
Size
screenSize
,
BuildContext
context
,
Color
home
,
...
...
lib/main.dart
View file @
7289d3c7
...
...
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import
'package:medapp_eksad/dashboard/main_dashboard.dart'
;
import
'package:medapp_eksad/homepage.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/solution.dart'
;
...
...
@@ -24,6 +25,7 @@ class MyApp extends StatelessWidget {
'/solutions'
:
(
context
)
=>
const
Solutions
(),
'/contact'
:
(
context
)
=>
const
ContactUs
(),
'/login'
:
(
context
)
=>
const
login
(),
'/register'
:
(
context
)
=>
const
Register
(),
'/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';
// import 'package:mcs_flutter/const/conts.dart';
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
import
'package:medapp_eksad/api/contact_api.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
class
ContactUs2
extends
StatelessWidget
{
...
...
@@ -251,10 +252,10 @@ class ContactUs2 extends StatelessWidget {
style:
Btn_Submit
(),
onPressed:
()
async
{
if
(
_formKey
.
currentState
!.
validate
())
{
final
response
=
await
SendEmail
(
final
response
=
await
savecontact
(
nameController
.
value
.
text
,
phoneController
.
value
.
text
,
emailController
.
value
.
text
,
phoneController
.
value
.
text
,
messageController
.
value
.
text
);
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
response
==
200
...
...
@@ -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';
// import 'package:mcs_flutter/const/conts.dart';
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
import
'package:medapp_eksad/api/contact_api.dart'
;
import
'package:medapp_eksad/widget/button_color.dart'
;
...
...
@@ -232,10 +233,10 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
style:
Btn_Submit
(),
onPressed:
()
async
{
if
(
_formKey
.
currentState
!.
validate
())
{
final
response
=
await
SendEmail
(
final
response
=
await
savecontact
(
nameController
.
value
.
text
,
phoneController
.
value
.
text
,
emailController
.
value
.
text
,
phoneController
.
value
.
text
,
messageController
.
value
.
text
);
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
response
==
200
...
...
@@ -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:medapp_eksad/widget/button_color.dart'
;
class
SmallHome4
extends
StatelessWidget
{
const
SmallHome4
({
Key
?
key
})
:
super
(
key:
key
);
...
...
@@ -10,7 +9,7 @@ class SmallHome4 extends StatelessWidget {
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
),
width:
ScreenSize
.
width
,
height:
ScreenSize
.
height
*
1.
5
,
height:
ScreenSize
.
height
*
1.
7
,
color:
Colors
.
white
,
child:
Container
(
width:
ScreenSize
.
width
*
0.20
,
...
...
@@ -21,8 +20,7 @@ class SmallHome4 extends StatelessWidget {
color:
Colors
.
blue
[
900
],
boxShadow:
[
BoxShadow
(
color:
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
).
withAlpha
(
60
),
color:
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
).
withAlpha
(
60
),
blurRadius:
15.0
,
spreadRadius:
10.0
,
offset:
const
Offset
(
...
...
@@ -32,119 +30,72 @@ class SmallHome4 extends StatelessWidget {
),
],
),
child:
Container
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
width:
ScreenSize
.
width
*
0.36
,
height:
ScreenSize
.
height
*
0.69
,
color:
Colors
.
blue
[
900
],
child:
Container
(
alignment:
Alignment
.
topLeft
,
padding:
EdgeInsets
.
all
(
30
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
SizedBox
(
height:
40
,),
Row
(
children:
[
Text
(
"Mobile & Web Apps"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
34
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Container
(
width:
ScreenSize
.
width
*
0.36
,
height:
ScreenSize
.
height
*
0.7
,
color:
Colors
.
blue
[
900
],
child:
Column
(
children:
<
Widget
>[
Column
(
children:
[
Container
(
height:
ScreenSize
.
height
*
0.3
,
width:
ScreenSize
.
width
*
0.30
,
child:
Text
(
"Mobile & Web Apps"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
34
),
textAlign:
TextAlign
.
center
,
),
),
Container
(
height:
ScreenSize
.
height
*
0.3
,
width:
ScreenSize
.
width
*
0.30
,
child:
Text
(
"MedApps menyediakan Aplikasi Mobile dan juga website yang bisa anda kunjungi"
,
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
)),
Container
(
height:
50
,
width:
200
,
child:
ElevatedButton
(
onPressed:
()
{},
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
blue
[
900
],
onSurface:
Colors
.
white
,
side:
BorderSide
(
color:
Colors
.
white
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
30
)),
),
textAlign:
TextAlign
.
left
,
),
],
),
SizedBox
(
height:
30
,),
Row
(
children:
[
Container
(
height:
100
,
width:
ScreenSize
.
width
*
0.30
,
child:
Text
(
"MedApps menyediakan Aplikasi Mobile dan juga website yang bisa anda kunjungi"
,
style:
TextStyle
(
fontSize:
18
,
color:
Colors
.
white
),
)
child:
Text
(
"LEARN MORE"
,
style:
TextStyle
(
fontSize:
18
,
letterSpacing:
2
),
),
]
,
)
,
),
// SizedBox(height: 10,),
Row
(
children:
[
Container
(
height
:
50
,
width
:
200
,
child:
ElevatedButton
(
onPressed:
(){},
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
blue
[
900
],
onSurface:
Colors
.
white
,
side:
BorderSide
(
color:
Colors
.
white
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
30
)
),
),
),
child:
Text
(
"LEARN MORE"
,
style:
TextStyle
(
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
// ),
// ),
// ),
),
],
Container
(
width:
ScreenSize
.
width
*
0.3
,
height:
ScreenSize
.
height
*
0.69
,
// color: Colors.white,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
image:
DecorationImage
(
image:
AssetImage
(
'assets/images/medaps3.png'
)),
borderRadius:
BorderRadius
.
circular
(
20
)),
),
],
),
)
,
]
,
),
SizedBox
(
width:
40
,),
Container
(
width:
ScreenSize
.
width
*
0.3
,
height:
ScreenSize
.
height
*
0.69
,
// color: Colors.white,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
image:
DecorationImage
(
image:
AssetImage
(
'assets/images/medaps3.png'
)
),
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