Commit 80179414 authored by Ade Fikriatul  Ilmi's avatar Ade Fikriatul Ilmi

menambahkan content di contact us

parent 24343d95
...@@ -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( Text("Leave Your Contact Info and Let's Discuss Business",
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( style: GoogleFonts.poppins(
color: Colors.white, color: Colors.white,
fontSize: 18, fontSize: 30,
// fontWeight: FontWeight.bold, fontWeight: FontWeight.w500)),
letterSpacing: 1.1)), // 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,
), ),
], ],
), ),
......
...@@ -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;
...@@ -47,36 +49,41 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -47,36 +49,41 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
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' Text("Leave Your Contact Info and Let's Discuss Business",
'an outsourcing partner '
'you can trust and thrive with',
textAlign: TextAlign.left,
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
color: Colors.white, color: Colors.white,
fontSize: 30, fontSize: 30,
fontWeight: FontWeight.bold)), 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(
flex: 1,
), ),
Center( Text(
child: Text( "We’ll contact you immediately to discuss potential business",
'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. '
'Looking for an outsourcing partner? ',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins( style: GoogleFonts.poppins(
color: Colors.white, color: Colors.white,
fontSize: 18, fontSize: 18,
// fontWeight: FontWeight.bold, fontWeight: FontWeight.w500)),
letterSpacing: 1.1)), const Spacer(
flex: 3,
), ),
Center( SizedBox(
child: Text("We’ll contact you immediately to discuss to help you.", height: 1,
style: GoogleFonts.poppins(
color: Colors.white, fontSize: 18, letterSpacing: 1.2)),
), ),
SizedBox(height: 5,),
Center( Center(
child: Form( child: Form(
key: _formKey, key: _formKey,
...@@ -112,6 +119,12 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -112,6 +119,12 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
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(
...@@ -148,6 +161,14 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -148,6 +161,14 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
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(
...@@ -184,6 +205,12 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -184,6 +205,12 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
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(
...@@ -218,7 +245,7 @@ class _ContactUs2_smallState extends State<ContactUs2_small> { ...@@ -218,7 +245,7 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
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;
}, },
...@@ -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),
), ),
), ),
), ),
...@@ -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;
} }
} }
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