mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 18:16:21 +00:00
Refactor email and password validation logic in LoginForm widget
Update email and password validation logic in the LoginForm widget to only perform validation when the state is not AuthTokenError. This ensures that validation is skipped when there is an authentication token error.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/view/app_layout.dart';
|
||||
import 'package:syncrow_app/features/auth/view/widgets/didnt_get_code/didnt_get_code_view.dart';
|
||||
import 'package:syncrow_app/features/auth/view/widgets/login/login_view.dart';
|
||||
@ -7,6 +8,7 @@ import 'package:syncrow_app/features/auth/view/widgets/privacy_policy/privacy_po
|
||||
import 'package:syncrow_app/features/auth/view/widgets/sign_up/sign_up_view.dart';
|
||||
import 'package:syncrow_app/features/auth/view/widgets/user_agreement/user_agreement_view.dart';
|
||||
import 'package:syncrow_app/features/dashboard/view/dashboard_view.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/devices_cubit.dart';
|
||||
import 'package:syncrow_app/features/devices/view/devices_view.dart';
|
||||
import 'package:syncrow_app/features/layout/view/layout_view.dart';
|
||||
import 'package:syncrow_app/features/menu/view/menu_view.dart';
|
||||
@ -25,7 +27,11 @@ class Router {
|
||||
|
||||
case Routes.devicesRoute:
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => const DevicesView(), settings: settings);
|
||||
builder: (_) => BlocProvider(
|
||||
create: (_) => DevicesCubit.getInstance(),
|
||||
child: const DevicesView(),
|
||||
),
|
||||
settings: settings);
|
||||
|
||||
case Routes.profileRoute:
|
||||
return MaterialPageRoute(
|
||||
|
Reference in New Issue
Block a user