Live Testing #1

This commit is contained in:
2025-09-12 15:01:39 +05:30
parent d4bba6dc49
commit eba38c2e42
6 changed files with 24 additions and 15 deletions

View File

@@ -3,6 +3,8 @@ import 'package:kmobile/api/services/auth_service.dart';
import 'package:kmobile/di/injection.dart';
import 'package:kmobile/features/auth/screens/login_screen.dart';
import '../../../l10n/app_localizations.dart';
class SetPasswordScreen extends StatefulWidget {
final String customerNo;
const SetPasswordScreen({super.key, required this.customerNo});
@@ -75,7 +77,7 @@ class _SetPasswordScreenState extends State<SetPasswordScreen> {
});
} catch (e) {
setState(() {
_error = e.toString();
_error = AppLocalizations.of(context).invalidOtp;
_isLoading = false;
});
}
@@ -138,7 +140,9 @@ class _SetPasswordScreenState extends State<SetPasswordScreen> {
if (_error != null) ...[
Text(
_error!,
style: const TextStyle(color: Colors.red),
style: const TextStyle(color: Colors.red,
fontWeight: FontWeight.bold,
fontSize: 20),
textAlign: TextAlign.center,
),
const SizedBox(height: 16),

View File

@@ -32,7 +32,7 @@ class TpinSetupPromptScreen extends StatefulWidget {
mobileNumberToPass = authState.users[selectedAccountIndex].mobileNo ?? '';
}
}
await _changePasswordService.getOtp(mobileNumber: mobileNumberToPass);
await _changePasswordService.getOtpTpin(mobileNumber: mobileNumberToPass);
if (mounted) {
Navigator.pushReplacement(
context,

View File

@@ -60,7 +60,7 @@ class _ChangePasswordOTPScreenState extends State<ChangePasswordOTPScreen> {
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('${AppLocalizations.of(context).failedToValidate}: $e')),
SnackBar(content: Text(AppLocalizations.of(context).invalidOtp)),
);
}
}