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( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -280,25 +280,37 @@ Widget makeInput({label, obscureText = false}) {
const SizedBox( const SizedBox(
height: 5, height: 5,
), ),
FormBuilderTextField( Container(
initialValue: "", decoration: BoxDecoration(
name: label, color: const Color(0xff1b1c1e),
obscureText: obscureText, borderRadius: BorderRadius.circular(10.0),
style: const TextStyle(color: Colors.white), boxShadow: const [
decoration: const InputDecoration( BoxShadow(
contentPadding: EdgeInsets.symmetric(vertical: 0, horizontal: 10), color: Colors.black12,
focusedBorder: OutlineInputBorder( blurRadius: 6.0,
borderSide: BorderSide( offset: Offset(0, 2),
color: Colors.red,
), ),
), ],
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, 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( 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( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [