mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 09:07:56 +00:00
Refactor code for consistency and readability
- Removed unused imports and commented-out code - Updated class inheritance for AuthState subclasses - Reorganized code structure for better readability - Cleaned up debug print statements and replaced with dart:developer logs
This commit is contained in:
@@ -18,8 +18,6 @@ class LoginView extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
//TODO move to strings manager
|
||||
|
||||
return BlocConsumer<AuthCubit, AuthState>(
|
||||
listener: (context, state) {
|
||||
if (state is AuthError) {
|
||||
@@ -28,8 +26,8 @@ class LoginView extends StatelessWidget {
|
||||
content: Text(state.message),
|
||||
),
|
||||
);
|
||||
} else if (state is AuthSuccess) {
|
||||
Navigator.popAndPushNamed(context, Routes.homeRoute);
|
||||
} else if (state is AuthLoginSuccess) {
|
||||
Navigator.pushNamed(context, Routes.homeRoute);
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
|
||||
Reference in New Issue
Block a user