Commit f86f49d4 authored by Budi Prasetyo's avatar Budi Prasetyo

centerin field

parent 6df6c79f
......@@ -46,214 +46,222 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
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)),
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. '
'Looking for an outsourcing partner? ',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 18,
// fontWeight: FontWeight.bold,
letterSpacing: 1.1)),
Text("We’ll contact you immediately to discuss to help you.",
style: GoogleFonts.poppins(
color: Colors.white, fontSize: 18, letterSpacing: 1.2)),
Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
child: Text(
"Name",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
Center(
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)),
),
Center(
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. '
'Looking for an outsourcing partner? ',
textAlign: TextAlign.justify,
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 18,
// fontWeight: FontWeight.bold,
letterSpacing: 1.1)),
),
Center(
child: Text("We’ll contact you immediately to discuss to help you.",
style: GoogleFonts.poppins(
color: Colors.white, fontSize: 18, letterSpacing: 1.2)),
),
Center(
child: Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Container(
child: Text(
"Name",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
),
),
),
Container(
width: 450,
child: TextFormField(
controller: nameController,
decoration: const InputDecoration(
hintText: "Enter your Name",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
Container(
width: 450,
child: TextFormField(
controller: nameController,
decoration: const InputDecoration(
hintText: "Enter your Name",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
),
),
),
),
const SizedBox(
height: 20,
),
Container(
child: Text(
"Phone Number",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
const SizedBox(
height: 20,
),
Container(
child: Text(
"Phone Number",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
),
),
const SizedBox(
width: 80,
),
),
const SizedBox(
width: 80,
),
Container(
width: 450,
child: TextFormField(
controller: phoneController,
decoration: const InputDecoration(
hintText: "Enter a valid phone number",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
Container(
width: 450,
child: TextFormField(
controller: phoneController,
decoration: const InputDecoration(
hintText: "Enter a valid phone number",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
),
const SizedBox(
height: 20,
),
Container(
child: Text(
"Email",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
),
),
const SizedBox(
width: 7,
),
Container(
width: 450,
child: TextFormField(
controller: emailController,
decoration: const InputDecoration(
hintText: "Enter a valid email address",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
),
),
),
),
const SizedBox(
height: 20,
),
Container(
child: Text(
"Email",
const SizedBox(
height: 20,
),
Text(
"Message",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
),
),
const SizedBox(
width: 7,
),
Container(
width: 450,
child: TextFormField(
controller: emailController,
decoration: const InputDecoration(
hintText: "Enter a valid email address",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
Container(
width: 450,
child: TextFormField(
controller: messageController,
decoration: const InputDecoration(
hintText: "Enter your message",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
),
maxLines: 5,
validator: (value) {
if (value == null || value.isEmpty) {
return '*Required';
}
return null;
},
),
),
),
const SizedBox(
height: 20,
),
Text(
"Message",
style: GoogleFonts.poppins(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.w400),
),
Container(
width: 450,
child: TextFormField(
controller: messageController,
decoration: const InputDecoration(
hintText: "Enter your message",
fillColor: Colors.white,
filled: true,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.zero,
borderSide:
BorderSide(width: 1, color: Colors.white),
),
),
maxLines: 5,
validator: (value) {
if (value == null || value.isEmpty) {
return '*Required';
}
return null;
},
const SizedBox(
height: 20,
),
),
const SizedBox(
height: 20,
),
SizedBox(
height: 45,
width: 100,
child: TextButton(
style: Btn_Submit(),
onPressed: () async {
if (_formKey.currentState!.validate()) {
final response = await SendEmail(
nameController.value.text,
phoneController.value.text,
emailController.value.text,
messageController.value.text);
ScaffoldMessenger.of(context).showSnackBar(
response == 200
? const SnackBar(
content: Text('Message Sent!'),
backgroundColor: Colors.green)
: const SnackBar(
content:
Text('Failed to send message!'),
backgroundColor: Colors.red),
);
SizedBox(
height: 45,
width: 100,
child: TextButton(
style: Btn_Submit(),
onPressed: () async {
if (_formKey.currentState!.validate()) {
final response = await SendEmail(
nameController.value.text,
phoneController.value.text,
emailController.value.text,
messageController.value.text);
ScaffoldMessenger.of(context).showSnackBar(
response == 200
? const SnackBar(
content: Text('Message Sent!'),
backgroundColor: Colors.green)
: const SnackBar(
content:
Text('Failed to send message!'),
backgroundColor: Colors.red),
);
nameController.clear();
phoneController.clear();
emailController.clear();
messageController.clear();
}
},
child: const Text(
'Submit',
style: TextStyle(fontSize: 16, color: Colors.white),
nameController.clear();
phoneController.clear();
emailController.clear();
messageController.clear();
}
},
child: const Text(
'Submit',
style: TextStyle(fontSize: 16, color: Colors.white),
),
),
),
),
]),
]),
),
),
]),
),
......
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