6/27/1
This commit is contained in:
@@ -73,6 +73,40 @@ class SmsSignupEgypt extends StatelessWidget {
|
||||
const SizedBox(
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user