register_form - cleanup-2

This commit is contained in:
Matthew Patrick 2022-05-09 08:51:26 +07:00
parent 8554b18c2e
commit 9c7bf5270b
2 changed files with 29 additions and 17 deletions

View file

@ -268,7 +268,7 @@ class _CheckoutFormState extends State<CheckoutForm> {
}
}
Widget makeInput({label, obscureText = false}) {
Widget makeInput({label, obscureText = false, icon = Icons.email}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -280,25 +280,37 @@ Widget makeInput({label, obscureText = false}) {
const SizedBox(
height: 5,
),
FormBuilderTextField(
initialValue: "",
name: label,
obscureText: obscureText,
style: const TextStyle(color: Colors.white),
decoration: const InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 0, horizontal: 10),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.red,
Container(
decoration: BoxDecoration(
color: const Color(0xff1b1c1e),
borderRadius: BorderRadius.circular(10.0),
boxShadow: const [
BoxShadow(
color: Colors.black12,
blurRadius: 6.0,
offset: Offset(0, 2),
),
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
],
),
child: FormBuilderTextField(
initialValue: "",
name: label,
obscureText: obscureText,
style: const TextStyle(color: Colors.white),
decoration: InputDecoration(
prefixIcon: Icon(
icon,
color: Colors.white,
),
contentPadding: const EdgeInsets.only(top: 14.0),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(
color: Colors.red,
),
borderRadius: BorderRadius.circular(10.0)),
enabledBorder: InputBorder.none,
border: InputBorder.none,
),
border:
OutlineInputBorder(borderSide: BorderSide(color: Colors.white)),
),
),
const SizedBox(

View file

@ -171,7 +171,7 @@ class RegisterFormState extends State<RegisterForm> {
}
}
Widget makeInput({label, obscureText = false, icon = Icons.email}) {
Widget makeInput({label, obscureText = false, icon}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [