6/30/1
This commit is contained in:
@@ -74,51 +74,18 @@ class SmsSignupEgypt extends StatelessWidget {
|
||||
height: 10,
|
||||
),
|
||||
if (registerController.isSent)
|
||||
Obx(() => Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
child: registerController.remainingTime > 0
|
||||
? Column(
|
||||
children: [
|
||||
Text(
|
||||
'${(registerController.remainingTime / 60).floor()}:${(registerController.remainingTime % 60).toString().padLeft(2, '0')} remaining',
|
||||
style: AppStyle.subtitle,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
LinearProgressIndicator(
|
||||
value: registerController.remainingTime /
|
||||
300, // Assuming 300 seconds (5 minutes) total
|
||||
backgroundColor: Colors.grey[300],
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
Theme.of(context).primaryColor),
|
||||
),
|
||||
],
|
||||
)
|
||||
: TextButton(
|
||||
onPressed: () =>
|
||||
registerController.sendOtpMessage(),
|
||||
child: Text('Resend code'.tr),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height:
|
||||
16), // Add some space after the timer or button
|
||||
],
|
||||
)),
|
||||
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(
|
||||
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()),
|
||||
// Submit button
|
||||
MyElevatedButton(
|
||||
onPressed: () async {
|
||||
@@ -132,7 +99,7 @@ class SmsSignupEgypt extends StatelessWidget {
|
||||
);
|
||||
}),
|
||||
],
|
||||
isleading: true,
|
||||
isleading: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user