Bug fixes

This commit is contained in:
Abdullah Alassaf
2024-06-30 15:10:01 +03:00
parent 9b37545691
commit 288ea6a1e2
8 changed files with 112 additions and 97 deletions
+2 -2
View File
@@ -253,7 +253,7 @@ class AuthCubit extends Cubit<AuthState> {
emit(AuthLoginError(message: 'Something went wrong'));
}
} catch (failure) {
emit(AuthLoginError(message: failure.toString()));
emit(AuthLoginError(message: 'Something went wrong'));
return;
}
}
@@ -268,7 +268,7 @@ class AuthCubit extends Cubit<AuthState> {
(Route route) => false,
);
} catch (failure) {
emit(AuthLogoutError(message: failure.toString()));
emit(AuthLogoutError(message: 'Something went wrong'));
return;
}
}
+10 -7
View File
@@ -18,8 +18,8 @@ import 'package:syncrow_app/utils/resource_manager/constants.dart';
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
class OtpView extends StatefulWidget {
final bool isForgetPage;
const OtpView({super.key,this.isForgetPage=false});
final bool isForgetPage;
const OtpView({super.key, this.isForgetPage = false});
@override
State<OtpView> createState() => _OtpViewState();
@@ -121,9 +121,13 @@ class _OtpViewState extends State<OtpView> {
if (state is AuthOtpSuccess) {
Navigator.of(context).pop();
Navigator.of(context).pop();
widget.isForgetPage?
Navigator.push(context, MaterialPageRoute(builder: (context) => const CreateNewPasswordPage(),)):
Navigator.popAndPushNamed(context, Routes.homeRoute);
widget.isForgetPage
? Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const CreateNewPasswordPage(),
))
: Navigator.popAndPushNamed(context, Routes.homeRoute);
}
if (state is ResendOtpSuccess) {
startTimer(30);
@@ -194,8 +198,7 @@ class _OtpViewState extends State<OtpView> {
},
child: RichText(
text: TextSpan(
text:
'We have sent the verification codeWe have sent the verification code to',
text: 'We have sent the verification code to',
style: Theme.of(context).textTheme.titleSmall!.copyWith(
color: Colors.white,
fontWeight: FontsManager.regular,