SMS integrated with new ui
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:kmobile/app.dart';
|
||||
import 'package:kmobile/features/auth/screens/mpin_screen.dart';
|
||||
import 'package:kmobile/features/auth/screens/set_password_screen.dart';
|
||||
import 'package:kmobile/features/auth/screens/tnc_required_screen.dart';
|
||||
import 'package:kmobile/features/auth/screens/verification_screen.dart';
|
||||
import 'package:kmobile/widgets/tnc_dialog.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -30,12 +31,23 @@ class LoginScreenState extends State<LoginScreen>
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void _submitForm() {
|
||||
void _submitForm() async {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
context.read<AuthCubit>().login(
|
||||
_customerNumberController.text.trim(),
|
||||
_passwordController.text,
|
||||
);
|
||||
final bool? verificationSuccess = await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => VerificationScreen(
|
||||
customerNo: _customerNumberController.text.trim(),
|
||||
password: _passwordController.text,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
if (verificationSuccess == true && mounted) {
|
||||
context.read<AuthCubit>().login(
|
||||
_customerNumberController.text.trim(),
|
||||
_passwordController.text,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user