chore : delete auth package because each project has different auth , must be separated auth logic
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
import 'package:rasadyar_auth/data/repositories/auth_repository_imp.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../di/chicken_di.dart';
|
||||
import 'constant.dart';
|
||||
|
||||
/*class DioRemoteManager {
|
||||
DioRemote? _currentClient;
|
||||
ApiEnvironment? _currentEnv;
|
||||
|
||||
Future<DioRemote> setEnvironment([
|
||||
ApiEnvironment env = ApiEnvironment.dam,
|
||||
]) async {
|
||||
if (_currentEnv != env) {
|
||||
_currentClient = DioRemote(baseUrl: env.baseUrl);
|
||||
await _currentClient?.init();
|
||||
_currentEnv = env;
|
||||
}
|
||||
return _currentClient!;
|
||||
}
|
||||
|
||||
DioRemote get currentClient {
|
||||
if (_currentClient == null) {
|
||||
throw Exception('Call setEnvironment() before accessing DioRemote.');
|
||||
}
|
||||
|
||||
return _currentClient!;
|
||||
}
|
||||
|
||||
ApiEnvironment? get currentEnv => _currentEnv;
|
||||
}*/
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import 'package:rasadyar_auth/data/models/local/user_local/user_local_model.dart';
|
||||
import 'package:rasadyar_auth/data/services/token_storage_service.dart';
|
||||
import 'package:rasadyar_auth/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/data/datasource/local/chicken_local_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/datasource/remote/chicken_remote_imp.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/chicken_repository_imp.dart';
|
||||
import 'package:rasadyar_chicken/hive_registrar.g.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
GetIt diChicken = GetIt.instance;
|
||||
@@ -24,7 +22,7 @@ Future<void> setupChickenDI() async {
|
||||
},
|
||||
clearTokenCallback: () async {
|
||||
await tokenService.deleteTokens();
|
||||
Get.offAllNamed(AuthPaths.auth, arguments: Module.chicken);
|
||||
Get.offAllNamed(ChickenRoutes.auth, arguments: Module.chicken);
|
||||
},
|
||||
authArguments: Module.chicken,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user