Commit 69e1699e authored by Budi Prasetyo's avatar Budi Prasetyo
parents 9d8c7357 747fc7cd
...@@ -37,7 +37,7 @@ class _SignInState extends State<SignIn> { ...@@ -37,7 +37,7 @@ class _SignInState extends State<SignIn> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// setPageTitle('Login MedApps', context); setPageTitle('Login MedApps', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
body: Stack( body: Stack(
......
...@@ -54,7 +54,7 @@ class _AboutUsState extends State<AboutUs> { ...@@ -54,7 +54,7 @@ class _AboutUsState extends State<AboutUs> {
final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// setPageTitle('About Us', context); setPageTitle('About Us', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
...@@ -67,56 +67,34 @@ class _AboutUsState extends State<AboutUs> { ...@@ -67,56 +67,34 @@ class _AboutUsState extends State<AboutUs> {
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? Stack( ? Stack(
children: [ children: [
FutureBuilder<dynamic>( ListView(
future: getSettingDesc2(), scrollDirection: Axis.vertical,
builder: (BuildContext context, AsyncSnapshot snapshot) { controller: controller2,
var pgm = snapshot.data[0]; children: [
return Title( SmallHome1(wijet: Button_scroll_small()),
title: pgm['title'], SmallHome2(),
color: Colors.white, SmallHome3(),
child: ListView( SmallHome4(),
scrollDirection: Axis.vertical, ContactUs2_small(),
controller: controller2, FooterSmall(),
children: [ ],
SmallHome1(wijet: Button_scroll_small()),
SmallHome2(),
SmallHome3(),
SmallHome4(),
ContactUs2_small(),
FooterSmall(),
],
),
);
},
), ),
ScrollUpButton(controller2),
], ],
) )
: Stack( : Stack(
children: [ children: [
FutureBuilder<dynamic>( ListView(
future: getSettingDesc2(), scrollDirection: Axis.vertical,
builder: (BuildContext context, AsyncSnapshot snapshot) { controller: controller2,
var pgm = snapshot.data[0]; children: [
return Title( Home1(wijet: Button_scroll()),
title: pgm['title'], const Home2(),
color: Colors.white, const Home3(),
child: ListView( const Home4(),
scrollDirection: Axis.vertical, ContactUs2(),
controller: controller2, Footer(),
children: [ ],
Home1(wijet: Button_scroll()),
const Home2(),
const Home3(),
const Home4(),
ContactUs2(),
Footer(),
],
),
);
},
), ),
ScrollUpButton(controller2),
], ],
), ),
); );
......
...@@ -48,7 +48,7 @@ class _ContactUsState extends State<ContactUs> { ...@@ -48,7 +48,7 @@ class _ContactUsState extends State<ContactUs> {
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>(); final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// setPageTitle('Contact Us', context); setPageTitle('Contact Us', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
...@@ -60,50 +60,28 @@ class _ContactUsState extends State<ContactUs> { ...@@ -60,50 +60,28 @@ class _ContactUsState extends State<ContactUs> {
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? Stack( ? Stack(
children: [ children: [
FutureBuilder<dynamic>( ListView(
future: getSettingDesc2(), scrollDirection: Axis.vertical,
builder: (BuildContext context, AsyncSnapshot snapshot) { controller: controller2,
var pgm = snapshot.data[0]; children: [
return Title( ContactUs1_small(wijet: Button_scroll_small()),
title: pgm['title'], ContactUs2_small(),
color: Colors.white, FooterSmall(),
child: ListView( ],
scrollDirection: Axis.vertical,
controller: controller2,
children: [
ContactUs1_small(wijet: Button_scroll_small()),
ContactUs2_small(),
FooterSmall(),
],
),
);
},
), ),
ScrollUpButton(controller2),
], ],
) )
: Stack( : Stack(
children: [ children: [
FutureBuilder<dynamic>( ListView(
future: getSettingDesc2(), scrollDirection: Axis.vertical,
builder: (BuildContext context, AsyncSnapshot snapshot) { controller: controller2,
var pgm = snapshot.data[0]; children: [
return Title( ContactUs1(wijet: Button_scroll()),
title: pgm['title'], ContactUs2(),
color: Colors.white, Footer(),
child: ListView( ],
scrollDirection: Axis.vertical,
controller: controller2,
children: [
ContactUs1(wijet: Button_scroll()),
ContactUs2(),
Footer(),
],
),
);
},
), ),
ScrollUpButton(controller2),
], ],
), ),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
......
...@@ -52,45 +52,37 @@ class ContactUs2 extends StatelessWidget { ...@@ -52,45 +52,37 @@ class ContactUs2 extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SizedBox(
height: screenSize.height * 0.23,
child: Text(
'Yes, you need '
'\n'
'an outsourcing partner '
'you can trust and thrive with',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.bold)),
),
const Spacer( const Spacer(
flex: 1, flex: 2,
),
SizedBox(
height: screenSize.height * 0.22,
child: Text(
'Go for the one who knows what they are doing, those who you share values with, '
'and those who will celebrate your success, and help you win over your biggest challenges. '
'\nLooking for an outsourcing partner? ',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 18,
// fontWeight: FontWeight.bold,
letterSpacing: 1.1)),
), ),
Text("Leave Your Contact Info and Let's Discuss Business",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.w500)),
// const Spacer(
// flex: 1,
// ),
// Text("Let's Discuss Business",
// style: GoogleFonts.poppins(
// color: Colors.white,
// fontSize: 35,
//
// fontWeight: FontWeight.w500,
// // fontWeight: FontWeight.bold,
// letterSpacing: 1.1)
// ),
const Spacer( const Spacer(
flex: 1, flex: 1,
), ),
Text("We’ll contact you immediately to discuss to help you.", Text(
"We’ll contact you immediately to discuss potential business",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
color: Colors.white, color: Colors.white,
fontSize: 18, fontSize: 18,
letterSpacing: 1.2)), fontWeight: FontWeight.w500)),
const Spacer( const Spacer(
flex: 2, flex: 3,
), ),
], ],
), ),
......
...@@ -42,7 +42,7 @@ class _SolutionsState extends State<Solutions> { ...@@ -42,7 +42,7 @@ class _SolutionsState extends State<Solutions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// setPageTitle('MeddApp Solutions', context); setPageTitle('Our Solutions', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
return Scaffold( return Scaffold(
key: _scaffoldKey, key: _scaffoldKey,
...@@ -55,53 +55,31 @@ class _SolutionsState extends State<Solutions> { ...@@ -55,53 +55,31 @@ class _SolutionsState extends State<Solutions> {
body: ResponsiveWidget.isSmallScreen(context) body: ResponsiveWidget.isSmallScreen(context)
? Stack( ? Stack(
children: [ children: [
FutureBuilder<dynamic>( ListView(
future: getSettingDesc2(), scrollDirection: Axis.vertical,
builder: (BuildContext context, AsyncSnapshot snapshot) { controller: controller2,
var pgm = snapshot.data[0]; children: [
return Title( SmallOurSolution(wijet: Button_scroll()),
title: pgm['title'], SmallOurSolution2(),
color: Colors.white, FooterSmall(),
child: ListView( ],
scrollDirection: Axis.vertical,
controller: controller2,
children: [
SmallOurSolution(wijet: Button_scroll()),
SmallOurSolution2(),
FooterSmall(),
],
),
);
},
), ),
ScrollUpButton(controller2),
], ],
) )
: Stack( : Stack(
children: [ children: [
FutureBuilder<dynamic>( ListView(
future: getSettingDesc2(), controller: controller2,
builder: (BuildContext context, AsyncSnapshot snapshot) { children: [
var pgm = snapshot.data[0]; OurSolution(
return Title( wijet: Button_scroll(),
title: pgm['title'], button: ButtonSolution(context),
color: Colors.white, ),
child: ListView( OurSolution2(),
controller: controller2, ContactUs2(),
children: [ Footer(),
OurSolution( ],
wijet: Button_scroll(),
button: ButtonSolution(context),
),
OurSolution2(),
ContactUs2(),
Footer(),
],
),
);
},
), ),
ScrollUpButton(controller2),
], ],
), ),
); );
......
...@@ -7,7 +7,6 @@ import 'package:http/http.dart' as http; ...@@ -7,7 +7,6 @@ import 'package:http/http.dart' as http;
import 'package:medapp_eksad/api/contact_api.dart'; 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_small extends StatefulWidget { class ContactUs2_small extends StatefulWidget {
const ContactUs2_small({Key? key}) : super(key: key); const ContactUs2_small({Key? key}) : super(key: key);
...@@ -23,6 +22,9 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -23,6 +22,9 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
final emailController = TextEditingController(); final emailController = TextEditingController();
final messageController = TextEditingController(); final messageController = TextEditingController();
String pattern =
r'(\+62|62|0)(\d{2,3})?\)?[ .-]?\d{2,4}[ .-]?\d{2,4}[ .-]?\d{2,4}';
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
...@@ -33,50 +35,55 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -33,50 +35,55 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
// color: Colors.blue, // color: Colors.blue,
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
colors: <Color>[ colors: <Color>[
Color(0xff137fc2), Color(0xff137fc2),
Color(0xff3958d5), Color(0xff3958d5),
Color(0xff184b80), Color(0xff184b80),
], ],
begin: Alignment.topCenter, begin: Alignment.topCenter,
end: Alignment.bottomCenter, end: Alignment.bottomCenter,
)), )),
child: Container( child: Container(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Center( const Spacer(
child: Text( flex: 2,
'Yes, you need '
'\n'
'an outsourcing partner '
'you can trust and thrive with',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 30,
fontWeight: FontWeight.bold)),
), ),
Center( Text("Leave Your Contact Info and Let's Discuss Business",
child: Text( style: GoogleFonts.poppins(
'Go for the one who knows what they are doing, those who you share values with, ' color: Colors.white,
'and those who will celebrate your success, and help you win over your biggest challenges. ' fontSize: 30,
'Looking for an outsourcing partner? ', fontWeight: FontWeight.w500)),
textAlign: TextAlign.justify, // const Spacer(
style: GoogleFonts.poppins( // flex: 1,
color: Colors.white, // ),
fontSize: 18, // Text("Let's Discuss Business",
// fontWeight: FontWeight.bold, // style: GoogleFonts.poppins(
letterSpacing: 1.1)), // color: Colors.white,
// fontSize: 35,
//
// fontWeight: FontWeight.w500,
// // fontWeight: FontWeight.bold,
// letterSpacing: 1.1)
// ),
const Spacer(
flex: 1,
), ),
Center( Text(
child: Text("We’ll contact you immediately to discuss to help you.", "We’ll contact you immediately to discuss potential business",
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
color: Colors.white, fontSize: 18, letterSpacing: 1.2)), color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.w500)),
const Spacer(
flex: 3,
),
SizedBox(
height: 1,
), ),
SizedBox(height: 5,),
Center( Center(
child: Form( child: Form(
key: _formKey, key: _formKey,
...@@ -104,14 +111,20 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -104,14 +111,20 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
), ),
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter your name';
}
return null;
},
), ),
), ),
const SizedBox( const SizedBox(
...@@ -140,14 +153,22 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -140,14 +153,22 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
), ),
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter your phone number';
} else if (!RegExp(pattern).hasMatch(value)) {
return 'Start with 628 or 08';
}
return null;
},
), ),
), ),
const SizedBox( const SizedBox(
...@@ -176,14 +197,20 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -176,14 +197,20 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
), ),
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter your email';
}
return null;
},
), ),
), ),
const SizedBox( const SizedBox(
...@@ -207,18 +234,18 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -207,18 +234,18 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero, borderRadius: BorderRadius.zero,
borderSide: borderSide:
BorderSide(width: 1, color: Colors.white), BorderSide(width: 1, color: Colors.white),
), ),
), ),
maxLines: 5, maxLines: 5,
validator: (value) { validator: (value) {
if (value == null || value.isEmpty) { if (value == null || value.isEmpty) {
return '*Required'; return 'Please enter your message';
} }
return null; return null;
}, },
...@@ -247,12 +274,12 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -247,12 +274,12 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
ScaffoldMessenger.of(context).showSnackBar( ScaffoldMessenger.of(context).showSnackBar(
response == 200 response == 200
? const SnackBar( ? const SnackBar(
content: Text('Message Sent!'), content: Text('Message Sent!'),
backgroundColor: Colors.green) backgroundColor: Colors.green)
: const SnackBar( : const SnackBar(
content: content:
Text('Failed to send message!'), Text('Failed to send message!'),
backgroundColor: Colors.red), backgroundColor: Colors.red),
); );
nameController.clear(); nameController.clear();
phoneController.clear(); phoneController.clear();
...@@ -262,7 +289,8 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -262,7 +289,8 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
}, },
child: const Text( child: const Text(
'Submit', 'Submit',
style: TextStyle(fontSize: 16, color: Colors.white), style:
TextStyle(fontSize: 16, color: Colors.white),
), ),
), ),
), ),
...@@ -277,7 +305,7 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -277,7 +305,7 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
Future SendEmail( Future SendEmail(
String name, String phone, String email, String message) async { String name, String phone, String email, String message) async {
final url = Uri.parse('https://api.emailjs.com/api/v1.0/email/send'); final url = Uri.parse('https://api.emailjs.com/api/v1.0/email/send');
const serviceId = 'service_7wwup8c'; const serviceId = 'service_7wwup8c';
const templateId = 'template_4u8rbur'; const templateId = 'template_4u8rbur';
const userId = 'fF4-BJSJ11O-S3J0Z'; const userId = 'fF4-BJSJ11O-S3J0Z';
final response = await http.post(url, final response = await http.post(url,
...@@ -298,5 +326,3 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -298,5 +326,3 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
return response.statusCode; return response.statusCode;
} }
} }
...@@ -28,7 +28,7 @@ class _DemoUserState extends State<DemoUser> { ...@@ -28,7 +28,7 @@ class _DemoUserState extends State<DemoUser> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// setPageTitle('Free Demo Medapp', context); setPageTitle('Demo', context);
var screenSize = MediaQuery.of(context).size; var screenSize = MediaQuery.of(context).size;
final user = context.read<FirebaseAuthMethods>().user; final user = context.read<FirebaseAuthMethods>().user;
final String mail = user.email!; final String mail = user.email!;
......
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