feat:login page connected with backend
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
abstract class ApiConst {
|
||||
static const String baseUrl = "https://superapp.felixits.uz/api/v1";
|
||||
|
||||
static const String login = "/auth/login";
|
||||
}
|
||||
|
||||
@@ -13,6 +13,9 @@ import 'package:dio/dio.dart' as _i361;
|
||||
import 'package:get_it/get_it.dart' as _i174;
|
||||
import 'package:injectable/injectable.dart' as _i526;
|
||||
|
||||
import '../../feature/auth/data/datasource/auth_datasource.dart' as _i246;
|
||||
import '../../feature/auth/domain/repository/auth_repository.dart' as _i884;
|
||||
import '../../feature/auth/domain/usecases/login_usecase.dart' as _i241;
|
||||
import '../../feature/auth/presentation/blocs/login_bloc/login_bloc.dart'
|
||||
as _i1065;
|
||||
import '../../feature/basket/presentation/blocs/basket_bloc.dart' as _i728;
|
||||
@@ -42,7 +45,6 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
final dioModule = _$DioModule();
|
||||
gh.factory<_i1007.HomeBloc>(() => _i1007.HomeBloc());
|
||||
gh.factory<_i728.BasketBloc>(() => _i728.BasketBloc());
|
||||
gh.factory<_i1065.LoginBloc>(() => _i1065.LoginBloc());
|
||||
gh.factory<_i991.BrowseBloc>(() => _i991.BrowseBloc());
|
||||
gh.factory<_i580.MainBloc>(() => _i580.MainBloc());
|
||||
gh.factory<_i311.SplashBloc>(() => _i311.SplashBloc());
|
||||
@@ -56,6 +58,21 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh.singleton<_i354.RequestHandlerService>(
|
||||
() => _i354.RequestHandlerService(gh<_i361.Dio>()),
|
||||
);
|
||||
gh.lazySingleton<_i246.AuthDatasource>(
|
||||
() => _i246.AuthDatasourceImpl(gh<_i354.RequestHandlerService>()),
|
||||
);
|
||||
gh.lazySingleton<_i884.AuthRepository>(
|
||||
() => _i884.AuthRepositoryImpl(
|
||||
gh<_i354.RequestHandlerService>(),
|
||||
gh<_i246.AuthDatasource>(),
|
||||
),
|
||||
);
|
||||
gh.factory<_i241.LoginUseCase>(
|
||||
() => _i241.LoginUseCase(gh<_i884.AuthRepository>()),
|
||||
);
|
||||
gh.factory<_i1065.LoginBloc>(
|
||||
() => _i1065.LoginBloc(gh<_i241.LoginUseCase>()),
|
||||
);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,11 +32,6 @@ class DioClient {
|
||||
responseBody: true,
|
||||
error: true,
|
||||
request: true,
|
||||
logPrint: (object) {
|
||||
if (kDebugMode) {
|
||||
log('Error ${object.toString()}');
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
return dio;
|
||||
|
||||
Reference in New Issue
Block a user