This commit is contained in:
Hamza-Ayed
2024-09-10 03:10:04 +03:00
parent 3135187408
commit 6aeb091719
15 changed files with 419 additions and 284 deletions

View File

@@ -17,7 +17,6 @@ class SmsSignupEgypt extends StatelessWidget {
body: [
GetBuilder<RegisterController>(builder: (registerController) {
return ListView(
// mainAxisAlignment: MainAxisAlignment.center,
children: [
// Logo at the top
Padding(
@@ -48,44 +47,68 @@ class SmsSignupEgypt extends StatelessWidget {
style: AppStyle.title,
),
),
// Phone number input field
// Phone number input field with country code dropdown
Padding(
padding: const EdgeInsets.all(16.0),
child: !registerController.isSent
? Form(
key: registerController.formKey3,
child: MyTextForm(
controller: registerController.phoneController,
label: 'Enter your phone number'.tr,
hint: 'Enter your phone number'.tr,
type: TextInputType.phone),
)
: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
registerController.phoneController.text,
style: AppStyle.title,
padding: const EdgeInsets.all(16.0),
child: !registerController.isSent
? Form(
key: registerController.formKey3,
child: Row(
children: [
// Country Code Dropdown
DropdownButton<String>(
value: registerController.selectedCountryCode,
items: registerController.countryCodes
.map((String code) {
return DropdownMenuItem<String>(
value: code,
child: Text(code),
);
}).toList(),
onChanged: (String? newValue) {
registerController.updateCountryCode(newValue!);
},
),
// Spacer
const SizedBox(width: 10),
// Phone Number Input Field
Expanded(
child: MyTextForm(
controller:
registerController.phoneController,
label: 'Enter your phone number'.tr,
hint: 'Enter your phone number'.tr,
type: TextInputType.phone),
),
],
),
)
: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
registerController.phoneController.text,
style: AppStyle.title,
),
)),
),
),
),
const SizedBox(
height: 10,
),
if (registerController.isSent)
Padding(
padding: const EdgeInsets.all(16.0),
child: registerController.isSent
? Form(
key: registerController.formKey3,
child: MyTextForm(
controller: registerController.verifyCode,
label: '5 digit'.tr,
hint: '5 digit'.tr,
type: TextInputType.number),
)
: const SizedBox()),
padding: const EdgeInsets.all(16.0),
child: Form(
key: registerController.formKey3,
child: MyTextForm(
controller: registerController.verifyCode,
label: '5 digit'.tr,
hint: '5 digit'.tr,
type: TextInputType.number),
),
),
// Submit button
MyElevatedButton(
onPressed: () async {