Mobile Number Implemented in OTP
This commit is contained in:
@@ -5,7 +5,8 @@ import 'package:kmobile/api/services/change_password_service.dart';
|
||||
import 'package:kmobile/di/injection.dart';
|
||||
|
||||
class TpinOtpScreen extends StatefulWidget {
|
||||
const TpinOtpScreen({super.key});
|
||||
final String mobileNumber;
|
||||
const TpinOtpScreen({super.key, required this.mobileNumber});
|
||||
|
||||
@override
|
||||
State<TpinOtpScreen> createState() => _TpinOtpScreenState();
|
||||
@@ -49,10 +50,9 @@ void _verifyOtp() async {
|
||||
});
|
||||
|
||||
try {
|
||||
// IMPORTANT: You may need to pass the mobile number here as well
|
||||
await _changePasswordService.validateOtp(
|
||||
otp: _enteredOtp,
|
||||
mobileNumber: '8981274001', // Replace with actual mobile number
|
||||
mobileNumber: widget.mobileNumber,
|
||||
);
|
||||
|
||||
if (mounted) {
|
||||
@@ -151,7 +151,6 @@ void _verifyOtp() async {
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
ElevatedButton.icon(
|
||||
// Update icon to show a loading indicator
|
||||
icon: _isLoading
|
||||
? const SizedBox(
|
||||
width: 20,
|
||||
|
||||
Reference in New Issue
Block a user