chore: clean up unused imports, update routing for authentication pages, and enhance UI components in the profile and captcha widgets

This commit is contained in:
2025-12-24 11:51:41 +03:30
parent 3eccf492ff
commit 60c58ef17e
17 changed files with 428 additions and 625 deletions

View File

@@ -9,6 +9,7 @@ import 'package:rasadyar_livestock/data/repository/auth/auth_repository_imp.dart
import 'package:rasadyar_livestock/data/repository/livestock/livestock_repository.dart';
import 'package:rasadyar_livestock/data/repository/livestock/livestock_repository_imp.dart';
import 'package:rasadyar_livestock/data/service/live_stock_storage_service.dart';
import 'package:rasadyar_livestock/features/auth/presentation/routes/pages.dart';
import 'package:rasadyar_livestock/hive_registrar.g.dart';
import 'package:rasadyar_livestock/presentation/routes/app_pages.dart';
@@ -25,7 +26,10 @@ Future<void> setupLiveStockDI() async {
Get.lazyPut(() => LiveStockStorageService());
if (tokenService.baseurl.value == null) {
await tokenService.saveBaseUrl(Module.inspection, 'https://api.dam.rasadyar.net/');
await tokenService.saveBaseUrl(
Module.inspection,
'https://api.dam.rasadyar.net/',
);
}
// First register AppInterceptor with lazy callbacks
@@ -48,7 +52,7 @@ Future<void> setupLiveStockDI() async {
},
clearTokenCallback: () async {
await tokenService.deleteModuleTokens(Module.liveStocks);
Get.offAllNamed(LiveStockRoutes.auth, arguments: Module.liveStocks);
Get.offAllNamed(AuthLiveStockRoutes.auth, arguments: Module.liveStocks);
},
authArguments: Module.liveStocks,
),
@@ -73,7 +77,8 @@ Future<void> setupLiveStockDI() async {
);
diLiveStock.registerLazySingleton<AuthRepository>(
() => AuthRepositoryImp(authRemote: diLiveStock.get<AuthRemoteDataSource>()),
() =>
AuthRepositoryImp(authRemote: diLiveStock.get<AuthRemoteDataSource>()),
);
//endregion
@@ -82,7 +87,9 @@ Future<void> setupLiveStockDI() async {
() => LivestockRemoteDataSourceImp(),
);
diLiveStock.registerLazySingleton<TmpLocalDataSource>(() => TmpLocalDataSource());
diLiveStock.registerLazySingleton<TmpLocalDataSource>(
() => TmpLocalDataSource(),
);
diLiveStock.registerLazySingleton<LivestockRepository>(
() => LivestockRepositoryImp(